diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3c7a97ae658170..ff773c6f51e05d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -15,7 +15,8 @@ ARG BUILD_VERSION # All tools required for compilation belong in chip-build, forms "truth" for CHIP build tooling -FROM connectedhomeip/chip-build-vscode:${BUILD_VERSION} +FROM ghcr.io/project-chip/chip-build-vscode:${BUILD_VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # This Dockerfile contains things useful for an interactive development environment ARG USERNAME=vscode diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 63da06c81cf467..f738660104089f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,7 @@ "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], - "initializeCommand": ".devcontainer/build.sh --tag matter-dev-environment:local --version 0.7.3", + "initializeCommand": ".devcontainer/build.sh --tag matter-dev-environment:local --version 1", "image": "matter-dev-environment:local", "remoteUser": "vscode", "customizations": { diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 33d3b335cfc2d6..2a1ead454e3ac4 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -590,6 +590,7 @@ getManualTests getstarted getTests GH +ghcr ghp githubusercontent gitignore @@ -640,6 +641,7 @@ HomePods hostapd hostname href +HEPA HTTPS HW hwadr diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index c44f9a5559c8ed..a1d7afbd9b00a3 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2cf7dc01d8f5ae..66403d723e3101 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -131,7 +131,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -275,7 +275,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -397,7 +397,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 183c115555f0e2..35d62da349d4f0 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.16 + image: ghcr.io/project-chip/chip-build:1 options: --user root steps: @@ -54,7 +54,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.7.16 + image: ghcr.io/project-chip/chip-build-esp32:1 options: --user root steps: @@ -64,6 +64,8 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: esp32 + - name: Fixup GdbGui requirement + run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - name: CI Examples ESP32 shell: bash run: | @@ -75,7 +77,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.7.16 + image: ghcr.io/project-chip/chip-build-nrf-platform:1 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml deleted file mode 100644 index 321b450f8799de..00000000000000 --- a/.github/workflows/cirque.yaml +++ /dev/null @@ -1,127 +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. - -name: Cirque - -on: - push: - pull_request: - merge_group: - workflow_dispatch: - -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 - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - cirque: - name: Cirque - - env: - DOCKER_RUN_VERSION: 0.7.3 - GITHUB_CACHE_PATH: /tmp/cirque-cache - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - # need to run with privilege, which isn't supported by job.XXX.contaner - # https://github.com/actions/container-action/issues/2 - # container: - # image: connectedhomeip/chip-build-cirque:0.7.3 - # volumes: - # - "/tmp:/tmp" - # - "/dev/pts:/dev/pts" - # env: - # LOG_DIR: /tmp/cirque_test_output/ - # CLEANUP_DOCKER_FOR_CI: 1 - # options: "--privileged" - - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Checkout submodules - uses: ./.github/actions/checkout-submodules - with: - platform: linux - - - name: Bootstrap Cache - uses: ./.github/actions/bootstrap-cache - - name: Bootstrap - run: | - integrations/docker/images/chip-build-cirque/run.sh \ - -- sh -c " \ - git config --global --add safe.directory '*' \ - && bash scripts/bootstrap.sh \ - && chown -R $(id -u):$(id -g) .environment \ - " - - - name: Get Cirque Bootstrap cache key - id: cirque-bootstrap-cache-key - run: echo "val=$(scripts/tests/cirque_tests.sh cachekeyhash)" >> $GITHUB_OUTPUT - - uses: Wandalen/wretry.action@v1.3.0 - name: Cirque Bootstrap cache - if: ${{ !env.ACT }} - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-cirque-${{ steps.cirque-bootstrap-cache-key.outputs.val }} - restore-keys: ${{ runner.os }}-cirque- - path: ${{ env.GITHUB_CACHE_PATH }} - - name: Cirque Bootstrap - run: | - integrations/docker/images/chip-build-cirque/run.sh \ - --env GITHUB_ACTION_RUN=1 \ - --env GITHUB_CACHE_PATH=${{ env.GITHUB_CACHE_PATH }} \ - --volume /tmp:/tmp \ - -- scripts/tests/cirque_tests.sh bootstrap - - - name: Artifact suffix - id: outsuffix - uses: haya14busa/action-cond@v1 - if: ${{ !env.ACT }} - with: - cond: ${{ github.event.pull_request.number == '' }} - if_true: "${{ github.sha }}" - if_false: "pull-${{ github.event.pull_request.number }}" - - name: Build Binaries - run: | - integrations/docker/images/chip-build-cirque/run.sh \ - -- sh -c " \ - git config --global --add safe.directory '*' \ - && scripts/build/gn_gen_cirque.sh \ - " - - name: Run Tests - run: | - integrations/docker/images/chip-build-cirque/run.sh \ - --env LOG_DIR=/tmp/cirque_test_output \ - --env CLEANUP_DOCKER_FOR_CI=1 \ - --env GITHUB_ACTION_RUN=1 \ - --privileged \ - --volume /tmp:/tmp \ - --volume /dev/pts:/dev/pts \ - -- scripts/tests/cirque_tests.sh run_all_tests - - - name: Uploading Binaries - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: cirque_log-${{steps.outsuffix.outputs.value}}-logs - path: /tmp/cirque_test_output/ diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index 150922d984fb08..d3e1d416076579 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -15,17 +15,28 @@ name: Docker CHIP images on: + workflow_call: + inputs: + push_images: + required: false + type: boolean + default: false push: paths: - - "integrations/docker/images/**" + - "integrations/docker/**" pull_request: paths: - - "integrations/docker/images/**" + - "integrations/docker/**" workflow_dispatch: - + inputs: + push_images: + required: false + type: boolean + default: false + jobs: - build_images: - name: Build Docker CHIP Build images + build_images_base: + name: Build Docker CHIP Build images - base runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' strategy: @@ -33,32 +44,129 @@ jobs: matrix: img: - "" - - "-ameba" - - "-android" - - "-cirque" + - "-minimal" + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/base/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/base/chip-build${{ matrix.img }} + ./build.sh --latest + build_images_stage_1: + needs: [build_images_base] + name: Build Docker CHIP Build images - stage 1 + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + strategy: + fail-fast: false + matrix: + img: - "-crosscompile" + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/stage-1/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/stage-1/chip-build${{ matrix.img }} + ./build.sh --latest + build_images_stage_2: + needs: [build_images_base, build_images_stage_1] + name: Build Docker CHIP Build images - stage 2 + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + strategy: + fail-fast: false + matrix: + img: + - "-ameba" + - "-asr" + - "-bouffalolab" - "-doxygen" - "-efr32" - "-esp32" - - "-esp32-qemu" - "-infineon" # NOTE: imx image requires too much space for GitHub-hosted runners. It fails with: # ApplyLayer exit status 1 stdout: stderr: write /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/opt/ltp/testcases/bin/fanotify15: no space left on device # - "-imx" + - "-java" - "-k32w" - "-mbed-os" - "-nrf-platform" - "-telink" - "-ti" - "-tizen" - - "-tizen-qemu" - "-openiotsdk" - # NOTE: vscode image consumes ~52 GB disk space but GitHub-hosted runners provide ~10 GB free disk space(https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) - #- "-vscode" steps: - name: Checkout uses: actions/checkout@v3 - - name: Build All images using project bash script + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/stage-2/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/stage-2/chip-build${{ matrix.img }} + ./build.sh --latest + + build_images_stage_3: + needs: [build_images_base, build_images_stage_1, build_images_stage_2] + name: Build Docker CHIP Build images - stage 3 + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + strategy: + fail-fast: false + matrix: + img: + - "-android" + - "-esp32-qemu" + - "-tizen-qemu" + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/stage-3/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} + run: | + cd integrations/docker/images/stage-3/chip-build${{ matrix.img }} + ./build.sh --latest + build_images_vscode: + needs: [build_images_base, build_images_stage_1, build_images_stage_2, build_images_stage_3] + name: Build Docker CHIP Build images - vscode + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' && false + strategy: + fail-fast: false + matrix: + img: + - "-vscode" + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build & Push images using project bash script + if: ${{ inputs.push_images == true }} + run: | + cd integrations/docker/images/vscode/chip-build${{ matrix.img }} + ./build.sh --latest --push + - name: Build images using project bash script + if: ${{ inputs.push_images == false }} run: | - cd integrations/docker/images/chip-build${{ matrix.img }} + cd integrations/docker/images/vscode-3/chip-build${{ matrix.img }} ./build.sh --latest diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 02f78481b89063..9a25537b8834b1 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-doxygen:0.7.3 + image: ghcr.io/project-chip/chip-build-doxygen:1 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index ef5947ec4adbbe..c4c164f880cd0c 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ameba:0.7.14 + image: ghcr.io/project-chip/chip-build-ameba:1 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index b826fcbe88c16c..c39724bcdbdd87 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-asr:0.7.14 + image: ghcr.io/project-chip/chip-build-asr:1 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 62fb197224f8e0..69399f966feadf 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-bouffalolab:0.7.3 + image: ghcr.io/project-chip/chip-build-bouffalolab:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 7d9ec65e5aac25..608465bc12f345 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' && false container: - image: connectedhomeip/chip-build-ti:0.7.14 + image: ghcr.io/project-chip/chip-build-ti:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 66c0f47e41d526..aeb32d23f6641a 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.7.3 + image: ghcr.io/project-chip/chip-build-ti:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 9a3840a9ff55e7..141033ffc2a4bd 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.7.25 + image: ghcr.io/project-chip/chip-build-efr32:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index f795cd4863ae5c..99c74c80eb7f27 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.7.3 + image: ghcr.io/project-chip/chip-build-esp32:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -46,6 +46,9 @@ jobs: with: platform: esp32 + - name: Fixup GdbGui requirement + run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt + - name: Set up environment for size reports uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} @@ -127,7 +130,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.7.3 + image: ghcr.io/project-chip/chip-build-esp32:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -139,6 +142,9 @@ jobs: with: platform: esp32 + - name: Fixup GdbGui requirement + run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt + - name: Build example Bridge App run: scripts/examples/esp_example.sh bridge-app diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index b798ae148c58cd..6a733159aac313 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.7.3 + image: ghcr.io/project-chip/chip-build-infineon:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index fa80b0d146e725..19b772bd52ab6c 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.7.14 + image: ghcr.io/project-chip/chip-build-k32w:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 15a55fbb604b36..f6e6d917f57940 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.7.3 + image: ghcr.io/project-chip/chip-build-crosscompile:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 476d94793023a1..28521ff204b599 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-imx:0.7.19.1 + image: ghcr.io/project-chip/chip-build-imx:1 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 3613a6e39781fc..86abe5b25d8dfa 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 5b92a89b751dc1..76cb3b3a4589ad 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.7.3 + image: ghcr.io/project-chip/chip-build-mbed-os:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index d685fb26cd384b..7f0c46f9abd56e 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index c0adbf2c5db492..18a8aa9836c3cf 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.7.16 + image: ghcr.io/project-chip/chip-build-nrf-platform:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 888904a5eb9338..338067b53cbe63 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-openiotsdk:0.7.3 + image: ghcr.io/project-chip/chip-build-openiotsdk:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 0f426d8286999b..228f2a32809d55 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 6e82cfa288639b..81dc9c46ef318a 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.7.24 + image: ghcr.io/project-chip/chip-build-telink:1 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -213,6 +213,18 @@ jobs: - name: clean out build output run: rm -rf ./out + - name: Build example Telink Smoke CO Alarm App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-smoke-co-alarm' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d smoke_co_alarm-app \ + out/telink-tlsr9518adk80d-smoke-co-alarm/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Temperature Measurement App run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 655b6a092f7f81..be99cb029bb293 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.7.3 + image: ghcr.io/project-chip/chip-build-tizen:1 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index bf2c2f391b961a..5816b6b1dfbba0 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.7.3 + image: ghcr.io/project-chip/chip-build-android:1 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index aabb379e8a8deb..7e83a81209a32e 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index a61175403e801c..08b9c5d8cb9211 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-java:0.7.15 + image: ghcr.io/project-chip/chip-build-java:1 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5c2a7441b08ad9..6bc7d403c2f491 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: ghcr.io/project-chip/chip-build:0.8 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index ea63c286056893..794d108446fa4d 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-minimal:0.7.3 + image: ghcr.io/project-chip/chip-build-minimal:1 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 43faed9920953d..078b4dd960c679 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.7.3 + image: ghcr.io/project-chip/chip-build-esp32-qemu:1 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -50,6 +50,9 @@ jobs: with: platform: esp32 + - name: Fixup GdbGui requirement + run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt + - name: Build ESP32 QEMU test images run: | scripts/run_in_build_env.sh " \ @@ -76,7 +79,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen-qemu:0.7.3 + image: ghcr.io/project-chip/chip-build-tizen-qemu:1 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 9e2c26166fef7f..a6c14d8401a5c2 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.7.3 + image: ghcr.io/project-chip/chip-build-esp32:1 steps: - name: Checkout @@ -68,7 +68,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.7.3 + image: ghcr.io/project-chip/chip-build-efr32:1 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/roll_and_build_docker.yaml b/.github/workflows/roll_and_build_docker.yaml new file mode 100644 index 00000000000000..7d94d71cf12204 --- /dev/null +++ b/.github/workflows/roll_and_build_docker.yaml @@ -0,0 +1,15 @@ +name: Manually Roll, Build, and Push Docker Images +on: + workflow_dispatch: +jobs: + roll_version: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Roll docker versions + run: ./scripts/helpers/roll_docker_version.sh ./integrations/docker/images/base/chip-build/version + - uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: Rolling Docker Version diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 8a095f0e604173..971fbd12493f24 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.7.3 + image: ghcr.io/project-chip/chip-build-android:1 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b8e5afb551d559..cba40591a9e4fc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -156,6 +156,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/scene.xml \ + src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml \ @@ -405,7 +406,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" @@ -447,7 +448,9 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_DA_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_DA_1_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py"' - name: Uploading core files uses: actions/upload-artifact@v3 diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 366a26d4b7fae6..d800d27ed040f6 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 2d7bb344e674b2..d15cbc5f004f29 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 4ab45952330bae..0e6033035f7297 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build:0.7.3 + image: ghcr.io/project-chip/chip-build:1 defaults: run: shell: sh diff --git a/.vscode/tasks.json b/.vscode/tasks.json index bb0c8ba01853ea..f8f7d94ca2b8aa 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -673,6 +673,7 @@ "telink-tlsr9518adk80d-ota-requestor", "telink-tlsr9518adk80d-pump-app", "telink-tlsr9518adk80d-pump-controller-app", + "telink-tlsr9518adk80d-smoke-co-alarm-app", "telink-tlsr9518adk80d-temperature-measurement", "telink-tlsr9518adk80d-thermostat", "telink-tlsr9518adk80d-window-covering", diff --git a/config/python/CHIPProjectConfig.h b/config/python/CHIPProjectConfig.h index 87940a900ce991..5effaaa13c6479 100644 --- a/config/python/CHIPProjectConfig.h +++ b/config/python/CHIPProjectConfig.h @@ -59,4 +59,6 @@ #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 1 #define CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE 1 +#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1 + #endif /* CHIPPROJECTCONFIG_H */ diff --git a/docs/examples/index.md b/docs/examples/index.md index 7757cc78b75e05..0f3a6e196f66db 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -247,3 +247,12 @@ tv-casting-app/**/README window-app/**/README ``` + +## Resource monitoring example + +```{toctree} +:glob: +:maxdepth: 1 + +resource-monitoring-app/**/README +``` 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 97833256a2a446..a6c71ff1f3ca46 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 @@ -2542,352 +2542,177 @@ server cluster AirQuality = 91 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for monitoring HEPA filters in a device */ -server cluster HepaFilterMonitoring = 113 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; +/** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ +server cluster SmokeCoAlarm = 92 { + enum AlarmStateEnum : ENUM8 { + kNormal = 0; kWarning = 1; kCritical = 2; } - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; - } - - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; - } - - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; + enum ContaminationStateEnum : ENUM8 { + kNormal = 0; + kLow = 1; + kWarning = 2; + kCritical = 3; } - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; + enum EndOfServiceEnum : ENUM8 { + kNormal = 0; + kExpired = 1; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for monitoring activated carbon filters in a device */ -server cluster ActivatedCarbonFilterMonitoring = 114 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; + enum ExpressedStateEnum : ENUM8 { + kNormal = 0; + kSmokeAlarm = 1; + kCOAlarm = 2; + kBatteryAlert = 3; + kTesting = 4; + kHardwareFault = 5; + kEndOfService = 6; + kInterconnectSmoke = 7; + kInterconnectCO = 8; } - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; + enum MuteStateEnum : ENUM8 { + kNotMuted = 0; + kMuted = 1; } - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; + enum SensitivityEnum : ENUM8 { + kHigh = 0; + kStandard = 1; + kLow = 2; } bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; + kSmokeAlarm = 0x1; + kCOAlarm = 0x2; } - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; + critical event SmokeAlarm = 0 { + AlarmStateEnum alarmSeverityLevel = 0; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for monitoring ceramic filters in a device */ -server cluster CeramicFilterMonitoring = 115 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; + critical event COAlarm = 1 { + AlarmStateEnum alarmSeverityLevel = 0; } - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; + info event LowBattery = 2 { + AlarmStateEnum alarmSeverityLevel = 0; } - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; + info event HardwareFault = 3 { } - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; + info event EndOfService = 4 { } - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; + info event SelfTestComplete = 5 { } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for monitoring electrostatic filters in a device */ -server cluster ElectrostaticFilterMonitoring = 116 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; + info event AlarmMuted = 6 { } - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; + info event MuteEnded = 7 { } - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; + critical event InterconnectSmokeAlarm = 8 { + AlarmStateEnum alarmSeverityLevel = 0; } - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; + critical event InterconnectCOAlarm = 9 { + AlarmStateEnum alarmSeverityLevel = 0; } - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; + info event AllClear = 10 { } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; + readonly attribute ExpressedStateEnum expressedState = 0; + readonly attribute AlarmStateEnum smokeState = 1; + readonly attribute AlarmStateEnum COState = 2; + readonly attribute AlarmStateEnum batteryAlert = 3; + readonly attribute MuteStateEnum deviceMuted = 4; + readonly attribute boolean testInProgress = 5; + readonly attribute boolean hardwareFaultAlert = 6; + readonly attribute EndOfServiceEnum endOfServiceAlert = 7; + readonly attribute AlarmStateEnum interconnectSmokeAlarm = 8; + readonly attribute AlarmStateEnum interconnectCOAlarm = 9; + readonly attribute ContaminationStateEnum contaminationState = 10; + attribute SensitivityEnum sensitivityLevel = 11; + readonly attribute epoch_s expiryDate = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for monitoring UV filters in a device */ -server cluster UvFilterMonitoring = 117 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; - } - - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; - } - - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; - } - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; - } - - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; - } - - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + command SelfTestRequest(): DefaultSuccess = 0; } -/** Attributes and commands for monitoring ionizing filters in a device */ -server cluster IonizingFilterMonitoring = 118 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; - } - - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; - } - - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; - } - - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; - } - - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; +/** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ +server cluster OperationalState = 96 { + enum ErrorStateEnum : ENUM8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for monitoring zeolite filters in a device */ -server cluster ZeoliteFilterMonitoring = 119 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; + enum OperationalStateEnum : ENUM8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; } - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; } - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; } - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; } - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; + info event OperationCompletion = 1 { + ENUM8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; + readonly attribute nullable CHAR_STRING phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute nullable elapsed_s countdownTime = 2; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute OperationalStateEnum operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for monitoring ozone filters in a device */ -server cluster OzoneFilterMonitoring = 120 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; - } - - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; - } - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; } - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; - } - - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; - } - - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + command Pause(): OperationalCommandResponse = 0; + command Stop(): OperationalCommandResponse = 1; + command Start(): OperationalCommandResponse = 2; + command Resume(): OperationalCommandResponse = 3; } -/** Attributes and commands for monitoring water tanks in a device */ -server cluster WaterTankMonitoring = 121 { +/** Attributes and commands for monitoring HEPA filters in a device */ +server cluster HepaFilterMonitoring = 113 { enum ChangeIndicationEnum : ENUM8 { kOK = 0; kWarning = 1; @@ -2921,59 +2746,19 @@ server cluster WaterTankMonitoring = 121 { readonly attribute DegradationDirectionEnum degradationDirection = 1; readonly attribute ChangeIndicationEnum changeIndication = 2; readonly attribute boolean inPlaceIndicator = 3; + attribute nullable epoch_s lastChangedTime = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for monitoring fuel tanks in a device */ -server cluster FuelTankMonitoring = 122 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; - } - - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; - } - - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; - } - - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; - } - - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; - } - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + command ResetCondition(): DefaultSuccess = 0; } -/** Attributes and commands for monitoring ink cartridges in a device */ -server cluster InkCartridgeMonitoring = 123 { +/** Attributes and commands for monitoring activated carbon filters in a device */ +server cluster ActivatedCarbonFilterMonitoring = 114 { enum ChangeIndicationEnum : ENUM8 { kOK = 0; kWarning = 1; @@ -3007,55 +2792,15 @@ server cluster InkCartridgeMonitoring = 123 { readonly attribute DegradationDirectionEnum degradationDirection = 1; readonly attribute ChangeIndicationEnum changeIndication = 2; readonly attribute boolean inPlaceIndicator = 3; + attribute nullable epoch_s lastChangedTime = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for monitoring toner cartridges in a device */ -server cluster TonerCartridgeMonitoring = 124 { - enum ChangeIndicationEnum : ENUM8 { - kOK = 0; - kWarning = 1; - kCritical = 2; - } - enum DegradationDirectionEnum : ENUM8 { - kUp = 0; - kDown = 1; - } - - enum ProductIdentifierTypeEnum : ENUM8 { - kUPC = 0; - kGTIN8 = 1; - kEAN = 2; - kGTIN14 = 3; - kOEM = 4; - } - - bitmap Feature : BITMAP32 { - kCondition = 0x1; - kWarning = 0x2; - } - - struct ReplacementProductStruct { - ProductIdentifierTypeEnum productIdentifierType = 0; - char_string<20> productIdentifierValue = 1; - } - - readonly attribute percent condition = 0; - readonly attribute DegradationDirectionEnum degradationDirection = 1; - readonly attribute ChangeIndicationEnum changeIndication = 2; - readonly attribute boolean inPlaceIndicator = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + command ResetCondition(): DefaultSuccess = 0; } /** An interface to a generic way to secure a door */ @@ -6497,141 +6242,58 @@ endpoint 1 { ram attribute clusterRevision default = 1; } - server cluster HepaFilterMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; + server cluster SmokeCoAlarm { + emits event SmokeAlarm; + emits event COAlarm; + emits event LowBattery; + emits event HardwareFault; + emits event EndOfService; + emits event SelfTestComplete; + emits event AlarmMuted; + emits event MuteEnded; + emits event InterconnectSmokeAlarm; + emits event InterconnectCOAlarm; + emits event AllClear; + persist attribute expressedState default = 0; + persist attribute smokeState default = 0; + persist attribute COState default = 0; + persist attribute batteryAlert default = 0; + persist attribute deviceMuted default = 0; + ram attribute testInProgress default = 0; + persist attribute hardwareFaultAlert default = 0; + persist attribute endOfServiceAlert default = 0; + ram attribute interconnectSmokeAlarm default = 0; + ram attribute interconnectCOAlarm default = 0; + ram attribute contaminationState default = 0; + ram attribute sensitivityLevel default = 1; + ram attribute expiryDate default = 0; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; } - server cluster ActivatedCarbonFilterMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; + server cluster OperationalState { + emits event OperationalError; + emits event OperationCompletion; + callback attribute phaseList; + callback attribute currentPhase; + callback attribute countdownTime; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster CeramicFilterMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster ElectrostaticFilterMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster UvFilterMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster IonizingFilterMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster ZeoliteFilterMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster OzoneFilterMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster WaterTankMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster FuelTankMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } - server cluster InkCartridgeMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; + server cluster HepaFilterMonitoring { + callback attribute condition; + callback attribute degradationDirection; + callback attribute changeIndication default = 0; + callback attribute inPlaceIndicator; + callback attribute lastChangedTime; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -6640,11 +6302,12 @@ endpoint 1 { ram attribute clusterRevision default = 1; } - server cluster TonerCartridgeMonitoring { - ram attribute condition; - ram attribute degradationDirection; - ram attribute changeIndication default = 0; - ram attribute inPlaceIndicator; + server cluster ActivatedCarbonFilterMonitoring { + callback attribute condition; + callback attribute degradationDirection; + callback attribute changeIndication default = 0; + callback attribute inPlaceIndicator; + callback attribute lastChangedTime; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; 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 518c6e563eaa70..76b4c43adb4c06 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 @@ -5703,7 +5703,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -5719,7 +5719,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13891,12 +13891,22 @@ ] }, { - "name": "HEPA Filter Monitoring", - "code": 113, + "name": "Smoke CO Alarm", + "code": 92, "mfgCode": null, - "define": "HEPA_FILTER_MONITORING_CLUSTER", + "define": "SMOKE_CO_ALARM_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "SelfTestRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "FeatureMap", @@ -13933,53 +13943,53 @@ ] }, { - "name": "HEPA Filter Monitoring", - "code": 113, + "name": "Smoke CO Alarm", + "code": 92, "mfgCode": null, - "define": "HEPA_FILTER_MONITORING_CLUSTER", + "define": "SMOKE_CO_ALARM_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "Condition", + "name": "ExpressedState", "code": 0, "mfgCode": null, "side": "server", - "type": "percent", + "type": "ExpressedStateEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DegradationDirection", + "name": "SmokeState", "code": 1, "mfgCode": null, "side": "server", - "type": "DegradationDirectionEnum", + "type": "AlarmStateEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChangeIndication", + "name": "COState", "code": 2, "mfgCode": null, "side": "server", - "type": "ChangeIndicationEnum", + "type": "AlarmStateEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13989,133 +13999,107 @@ "reportableChange": 0 }, { - "name": "InPlaceIndicator", + "name": "BatteryAlert", "code": 3, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "AlarmStateEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "DeviceMuted", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "MuteStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "TestInProgress", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "HardwareFaultAlert", + "code": 6, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "EndOfServiceAlert", + "code": 7, "mfgCode": null, "side": "server", - "type": "array", + "type": "EndOfServiceEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "InterconnectSmokeAlarm", + "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "AlarmStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "InterconnectCOAlarm", + "code": 9, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Activated Carbon Filter Monitoring", - "code": 114, - "mfgCode": null, - "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", + "type": "AlarmStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -14127,69 +14111,43 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Activated Carbon Filter Monitoring", - "code": 114, - "mfgCode": null, - "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Condition", - "code": 0, + "name": "ContaminationState", + "code": 10, "mfgCode": null, "side": "server", - "type": "percent", + "type": "ContaminationStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DegradationDirection", - "code": 1, + "name": "SensitivityLevel", + "code": 11, "mfgCode": null, "side": "server", - "type": "DegradationDirectionEnum", + "type": "SensitivityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChangeIndication", - "code": 2, + "name": "ExpiryDate", + "code": 12, "mfgCode": null, "side": "server", - "type": "ChangeIndicationEnum", + "type": "epoch_s", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -14200,29 +14158,13 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14238,7 +14180,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14254,7 +14196,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14270,7 +14212,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14312,84 +14254,943 @@ "maxInterval": 65534, "reportableChange": 0 } - ] - }, - { - "name": "Ceramic Filter Monitoring", - "code": 115, - "mfgCode": null, - "define": "CERAMIC_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + ], + "events": [ { - "name": "FeatureMap", - "code": 65532, + "name": "SmokeAlarm", + "code": 0, "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "side": "server", + "included": 1 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "COAlarm", + "code": 1, "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ceramic Filter Monitoring", - "code": 115, - "mfgCode": null, - "define": "CERAMIC_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + "side": "server", + "included": 1 + }, { - "name": "Condition", - "code": 0, + "name": "LowBattery", + "code": 2, "mfgCode": null, "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "DegradationDirection", - "code": 1, + "name": "HardwareFault", + "code": 3, "mfgCode": null, "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, + "included": 1 + }, + { + "name": "EndOfService", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "SelfTestComplete", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AlarmMuted", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "MuteEnded", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "InterconnectSmokeAlarm", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "InterconnectCOAlarm", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AllClear", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "HEPA Filter Monitoring", + "code": 113, + "mfgCode": null, + "define": "HEPA_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "HEPA Filter Monitoring", + "code": 113, + "mfgCode": null, + "define": "HEPA_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Activated Carbon Filter Monitoring", + "code": 114, + "mfgCode": null, + "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Activated Carbon Filter Monitoring", + "code": 114, + "mfgCode": null, + "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ceramic Filter Monitoring", + "code": 115, + "mfgCode": null, + "define": "CERAMIC_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ceramic Filter Monitoring", + "code": 115, + "mfgCode": null, + "define": "CERAMIC_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, "defaultValue": "", "reportable": 1, "minInterval": 1, @@ -14403,7 +15204,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14419,7 +15220,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14574,7 +15375,7 @@ "mfgCode": null, "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -14583,7 +15384,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14599,7 +15400,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14615,7 +15416,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14631,7 +15432,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14786,7 +15587,7 @@ "mfgCode": null, "define": "UV_FILTER_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -14795,7 +15596,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14811,7 +15612,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14827,7 +15628,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14843,7 +15644,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14998,7 +15799,7 @@ "mfgCode": null, "define": "IONIZING_FILTER_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -15007,7 +15808,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15023,7 +15824,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15039,7 +15840,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15055,7 +15856,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15210,7 +16011,7 @@ "mfgCode": null, "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -15219,7 +16020,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15235,7 +16036,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15251,7 +16052,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15267,7 +16068,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15422,7 +16223,7 @@ "mfgCode": null, "define": "OZONE_FILTER_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -15431,7 +16232,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15447,7 +16248,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15463,7 +16264,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15479,7 +16280,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15634,7 +16435,7 @@ "mfgCode": null, "define": "WATER_TANK_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -15643,7 +16444,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15659,7 +16460,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15675,7 +16476,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15691,7 +16492,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15846,7 +16647,7 @@ "mfgCode": null, "define": "FUEL_TANK_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -15855,7 +16656,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15871,7 +16672,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15887,7 +16688,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15903,7 +16704,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16058,7 +16859,7 @@ "mfgCode": null, "define": "INK_CARTRIDGE_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -16067,7 +16868,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16083,7 +16884,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16099,7 +16900,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -16115,7 +16916,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16270,7 +17071,7 @@ "mfgCode": null, "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "Condition", @@ -16279,7 +17080,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16295,7 +17096,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16311,7 +17112,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -16327,7 +17128,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h new file mode 100644 index 00000000000000..935fdb626bfd14 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h @@ -0,0 +1,150 @@ +/* + * + * Copyright (c) 2023 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 +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace OperationalState { + +// This is an application level delegate to handle operational state commands according to the specific business logic. +class OperationalStateDelegate : public Delegate +{ + +public: + /** + * Get the current operational state. + * @return The current operational state value + */ + uint8_t GetCurrentOperationalState() override; + + /** + * Get the list of supported operational states. + * Fills in the provided GenericOperationalState with the state at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of states. + * @param index The index of the state, with 0 representing the first state. + * @param operationalState The GenericOperationalState is filled. + */ + CHIP_ERROR GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) override; + + /** + * Get the list of supported operational phases. + * Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. + * @param index The index of the phase, with 0 representing the first phase. + * @param operationalPhase The GenericOperationalPhase is filled. + */ + CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase) override; + + /** + * Get current operational error. + * @param error The GenericOperationalError to fill with the current operational error value + */ + void GetCurrentOperationalError(GenericOperationalError & error) override; + + /** + * Get current phase + * @param phase The app::DataModel::Nullable to fill with the current phase value + */ + void GetCurrentPhase(app::DataModel::Nullable & phase) override; + + /** + * Get countdown time + * @param time The app::DataModel::Nullable to fill with the coutdown time value + */ + void GetCountdownTime(app::DataModel::Nullable & time) override; + + /** + * Set operational error. + * @param opErrState The new operational error. + */ + CHIP_ERROR SetOperationalError(const GenericOperationalError & opErrState) override; + + /** + * Set current operational state. + * @param opState The operational state that should now be the current one. + */ + CHIP_ERROR SetOperationalState(uint8_t opState) override; + + /** + * Set operational phase. + * @param phase The operational phase that should now be the current one. + */ + CHIP_ERROR SetPhase(const app::DataModel::Nullable & phase) override; + + /** + * Set coutdown time. + * @param time The coutdown time that should now be the current one. + */ + CHIP_ERROR SetCountdownTime(const app::DataModel::Nullable & time) override; + + // command callback + /** + * Handle Command Callback in application: Pause + * @param[out] get operational error after callback. + */ + void HandlePauseStateCallback(GenericOperationalError & err) override; + + /** + * Handle Command Callback in application: Resume + * @param[out] get operational error after callback. + */ + void HandleResumeStateCallback(GenericOperationalError & err) override; + + /** + * Handle Command Callback in application: Start + * @param[out] get operational error after callback. + */ + void HandleStartStateCallback(GenericOperationalError & err) override; + + /** + * Handle Command Callback in application: Stop + * @param[out] get operational error after callback. + */ + void HandleStopStateCallback(GenericOperationalError & err) override; + + OperationalStateDelegate(uint8_t aOperationalState, GenericOperationalError aOperationalError, + Span aOperationalStateList, + Span aOperationalPhaseList, + app::DataModel::Nullable aPhase = DataModel::Nullable(), + app::DataModel::Nullable aCountdownTime = DataModel::Nullable()) : + mOperationalState(aOperationalState), + mOperationalError(aOperationalError), mOperationalStateList(aOperationalStateList), + mOperationalPhaseList(aOperationalPhaseList), mOperationalPhase(aPhase), mCountdownTime(aCountdownTime) + {} + ~OperationalStateDelegate() = default; + +private: + uint8_t mOperationalState; + GenericOperationalError mOperationalError; + app::DataModel::List mOperationalStateList; + Span mOperationalPhaseList; + app::DataModel::Nullable mOperationalPhase; + app::DataModel::Nullable mCountdownTime; +}; + +} // namespace OperationalState +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp b/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp new file mode 100644 index 00000000000000..7501e386db00b7 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp @@ -0,0 +1,122 @@ +/* + * + * Copyright (c) 2023 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. + */ +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace OperationalState { + +using chip::Protocols::InteractionModel::Status; + +CHIP_ERROR OperationalStateDelegate::SetOperationalState(uint8_t opState) +{ + mOperationalState = opState; + return CHIP_NO_ERROR; +} + +CHIP_ERROR OperationalStateDelegate::SetPhase(const app::DataModel::Nullable & phase) +{ + mOperationalPhase = phase; + return CHIP_NO_ERROR; +} + +CHIP_ERROR OperationalStateDelegate::SetCountdownTime(const app::DataModel::Nullable & time) +{ + mCountdownTime = time; + return CHIP_NO_ERROR; +} + +uint8_t OperationalStateDelegate::GetCurrentOperationalState() +{ + return mOperationalState; +} + +CHIP_ERROR OperationalStateDelegate::SetOperationalError(const GenericOperationalError & opErrState) +{ + mOperationalError = opErrState; + return CHIP_NO_ERROR; +} + +void OperationalStateDelegate::GetCurrentOperationalError(GenericOperationalError & error) +{ + error = mOperationalError; +} + +void OperationalStateDelegate::GetCurrentPhase(app::DataModel::Nullable & phase) +{ + phase = mOperationalPhase; +} + +void OperationalStateDelegate::GetCountdownTime(app::DataModel::Nullable & time) +{ + time = mCountdownTime; +} + +CHIP_ERROR OperationalStateDelegate::GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) +{ + if (index > mOperationalStateList.size() - 1) + { + return CHIP_ERROR_NOT_FOUND; + } + operationalState = mOperationalStateList[index]; + return CHIP_NO_ERROR; +} + +CHIP_ERROR OperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase) +{ + if (index > mOperationalPhaseList.size() - 1) + { + return CHIP_ERROR_NOT_FOUND; + } + operationalPhase = mOperationalPhaseList[index]; + return CHIP_NO_ERROR; +} + +void OperationalStateDelegate::HandlePauseStateCallback(GenericOperationalError & err) +{ + // placeholder implementation + mOperationalState = to_underlying(OperationalStateEnum::kPaused); + err.Set(to_underlying(ErrorStateEnum::kNoError)); +} + +void OperationalStateDelegate::HandleResumeStateCallback(GenericOperationalError & err) +{ + // placeholder implementation + mOperationalState = to_underlying(OperationalStateEnum::kRunning); + err.Set(to_underlying(ErrorStateEnum::kNoError)); +} + +void OperationalStateDelegate::HandleStartStateCallback(GenericOperationalError & err) +{ + // placeholder implementation + mOperationalState = to_underlying(OperationalStateEnum::kRunning); + err.Set(to_underlying(ErrorStateEnum::kNoError)); +} + +void OperationalStateDelegate::HandleStopStateCallback(GenericOperationalError & err) +{ + // placeholder implementation + mOperationalState = to_underlying(OperationalStateEnum::kStopped); + err.Set(to_underlying(ErrorStateEnum::kNoError)); +} + +} // namespace OperationalState +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/operational-state-delegates.cpp b/examples/all-clusters-app/all-clusters-common/src/operational-state-delegates.cpp new file mode 100644 index 00000000000000..9d4a5cec4b111e --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/operational-state-delegates.cpp @@ -0,0 +1,133 @@ +/* + * + * Copyright (c) 2023 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. + */ +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace OperationalState { + +/** + * class to present Enquiry Table of Delegates + */ +struct DelegatesEnquiryTable +{ + /** + * Endpoint Id + */ + EndpointId mEndpointId; + /** + * Cluster Id + */ + ClusterId mClusterId; + /** + * The delegate for the cluster instance given by mEndpointId and mClusterId. + */ + Delegate * pItem; +}; + +/* + * An example to present device's endpointId + */ +constexpr EndpointId kDemoEndpointId = 1; + +/** + * Operational State List + * Note: User Define + */ +static const GenericOperationalState opStateList[] = { + GenericOperationalState(to_underlying(OperationalStateEnum::kStopped)), + GenericOperationalState(to_underlying(OperationalStateEnum::kRunning)), + GenericOperationalState(to_underlying(OperationalStateEnum::kPaused)), + GenericOperationalState(to_underlying(OperationalStateEnum::kError)), +}; + +/** + * Phase List + * Note: User Define + */ +static const GenericOperationalPhase opPhaseList[] = { + /** + * Phase List is null + */ + GenericOperationalPhase(DataModel::Nullable()), +}; + +/** + * Operational State Delegate + * Note: User Define + */ +static OperationalStateDelegate opStateDelegate(to_underlying(OperationalStateEnum::kStopped), + GenericOperationalError(to_underlying(ErrorStateEnum::kNoError)), + Span(opStateList), + Span(opPhaseList)); + +/** + * Enquiry Table of Operational State Cluster and alias Cluter Delegate corresponding to endpointId and clusterId + * Note: User Define + */ +constexpr DelegatesEnquiryTable kDelegatesEnquiryTable[] = { + // EndpointId, ClusterId, Delegate + { Clusters::OperationalState::kDemoEndpointId, Clusters::OperationalState::Id, &opStateDelegate }, +}; + +/** + * Get the pointer of target delegate for target endpoint and cluster + * @param[in] aEndpiontId The endpointId + * @param[in] aClusterID The clusterId + * @return the pointer of target delegate + */ +Delegate * getGenericDelegateTable(EndpointId aEndpointId, ClusterId aClusterId) +{ + for (size_t i = 0; i < ArraySize(kDelegatesEnquiryTable); ++i) + { + if (kDelegatesEnquiryTable[i].mEndpointId == aEndpointId && kDelegatesEnquiryTable[i].mClusterId == aClusterId) + { + return kDelegatesEnquiryTable[i].pItem; + } + } + return nullptr; +} + +// @brief Instance getter for the delegate for the given operational state alias cluster on the given endpoint. +// The delegate API assumes there will be separate delegate objects for each cluster instance. +// (i.e. each separate operational state cluster derivation, on each separate endpoint) +// @note This API should always be called prior to using the delegate and the return pointer should never be cached. +// @return Default global delegate instance. +Delegate * GetOperationalStateDelegate(EndpointId endpointId, ClusterId clusterId) +{ + return getGenericDelegateTable(endpointId, clusterId); +} + +} // namespace OperationalState +} // namespace Clusters +} // namespace app +} // namespace chip + +void MatterOperationalStateServerInit() +{ + using namespace chip::app; + static Clusters::OperationalState::OperationalStateServer operationalstateServer(Clusters::OperationalState::kDemoEndpointId, + Clusters::OperationalState::Id); + operationalstateServer.Init(); +} diff --git a/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-helper.cpp b/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-helper.cpp new file mode 100644 index 00000000000000..b0d3e700b0ff1f --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-helper.cpp @@ -0,0 +1,47 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ResourceMonitoring; + +constexpr std::bitset<4> gHepaFilterFeatureMap{ static_cast(Feature::kCondition) | + static_cast(Feature::kWarning) }; +constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(Feature::kCondition) | + static_cast(Feature::kWarning) }; + +static HepaFilterMonitoringInstance * gHepafilterInstance; +static ActivatedCarbonFilterMonitoringInstance * gActivatedCarbonFilterInstance; + +void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) +{ + gActivatedCarbonFilterInstance = new ActivatedCarbonFilterMonitoringInstance( + endpoint, static_cast(gActivatedCarbonFeatureMap.to_ulong()), DegradationDirectionEnum::kDown, true); + gActivatedCarbonFilterInstance->Init(); +} +void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) +{ + gHepafilterInstance = new HepaFilterMonitoringInstance(endpoint, static_cast(gHepaFilterFeatureMap.to_ulong()), + DegradationDirectionEnum::kDown, true); + gHepafilterInstance->Init(); +} diff --git a/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp new file mode 100644 index 00000000000000..66f86e5b28ab99 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp @@ -0,0 +1,23 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(chip::EndpointId endpointId) +{ + return true; +} diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index a710a2e5e006f9..656c35cb2998af 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull connectedhomeip/chip-build-ameba:latest + $ docker pull ghcr.io/project-chip/chip-build-ameba:latest - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:latest - Setup build environment: diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index 7440551e2fda27..cbb4da68790f63 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -154,6 +154,7 @@ list( APPEND ${list_chip_main_sources} ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/chipinterface.cpp diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn index 7d0b089b657b87..612c02d5126291 100755 --- a/examples/all-clusters-app/asr/BUILD.gn +++ b/examples/all-clusters-app/asr/BUILD.gn @@ -72,6 +72,7 @@ asr_executable("clusters_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${examples_plat_dir}/ButtonHandler.cpp", "${examples_plat_dir}/CHIPDeviceManager.cpp", diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn index 3194d47bb0f188..c48a3327c8ddaf 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn @@ -77,6 +77,7 @@ ti_simplelink_executable("all-clusters-app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", "${project_dir}/main/AppTask.cpp", diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn index 259fbdfa960eeb..4b15639b6da8a5 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -77,6 +77,7 @@ ti_simplelink_executable("all-clusters-app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", "${project_dir}/main/AppTask.cpp", diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 86249f3d81df0a..af8eed18cccd11 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -34,6 +34,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/mode-support" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" @@ -71,6 +72,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/channel-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/smoke-co-alarm-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/refrigerator-alarm-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn index da0b632e4c6902..b8cbc85b7f9f2d 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -108,6 +108,7 @@ psoc6_executable("clusters_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${examples_plat_dir}/LEDWidget.cpp", "${examples_plat_dir}/init_psoc6Platform.cpp", diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 402649c13bba05..7b289455c14632 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -24,7 +24,13 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegates.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-helper.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp", "AllClustersCommandDelegate.cpp", "AppOptions.cpp", "WindowCoveringManager.cpp", @@ -41,8 +47,10 @@ source_set("chip-all-clusters-common") { "${chip_root}/third_party/jsoncpp", ] - include_dirs = - [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ] + include_dirs = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/include", + ] cflags = [ "-Wconversion" ] diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 7350930176e865..f2333ed6fe0722 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -47,10 +47,14 @@ constexpr const char kChipEventFifoPathPrefix[] = "/tmp/chip_all_clusters_fifo_" LowPowerManager sLowPowerManager; NamedPipeCommands sChipNamedPipeCommands; AllClustersCommandDelegate sAllClustersCommandDelegate; -chip::app::Clusters::WindowCovering::WindowCoveringManager sWindowCoveringManager; +Clusters::WindowCovering::WindowCoveringManager sWindowCoveringManager; } // namespace +#ifdef EMBER_AF_PLUGIN_OPERATIONAL_STATE_SERVER +extern void MatterOperationalStateServerInit(); +#endif + void OnIdentifyStart(::Identify *) { ChipLogProgress(Zcl, "OnIdentifyStart"); @@ -167,6 +171,9 @@ void ApplicationInit() gExampleDeviceInstanceInfoProvider.Init(defaultProvider); SetDeviceInstanceInfoProvider(&gExampleDeviceInstanceInfoProvider); } +#ifdef EMBER_AF_PLUGIN_OPERATIONAL_STATE_SERVER + MatterOperationalStateServerInit(); +#endif } void ApplicationExit() @@ -180,12 +187,12 @@ void ApplicationExit() void emberAfLowPowerClusterInitCallback(EndpointId endpoint) { ChipLogProgress(NotSpecified, "Setting LowPower default delegate to global manager"); - chip::app::Clusters::LowPower::SetDefaultDelegate(endpoint, &sLowPowerManager); + Clusters::LowPower::SetDefaultDelegate(endpoint, &sLowPowerManager); } void emberAfWindowCoveringClusterInitCallback(chip::EndpointId endpoint) { sWindowCoveringManager.Init(endpoint); - chip::app::Clusters::WindowCovering::SetDefaultDelegate(endpoint, &sWindowCoveringManager); - chip::app::Clusters::WindowCovering::ConfigStatusUpdateFeatures(endpoint); + Clusters::WindowCovering::SetDefaultDelegate(endpoint, &sWindowCoveringManager); + Clusters::WindowCovering::ConfigStatusUpdateFeatures(endpoint); } diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index a654994ddea9c6..32efe99283f17e 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -60,6 +60,7 @@ target_sources(${APP_TARGET} PRIVATE ${MBED_COMMON}/util/LEDWidget.cpp ${MBED_COMMON}/util/DFUManager.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ) diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 6b28a6e1a61c3c..79582280b31a55 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -57,6 +57,7 @@ target_sources(app PRIVATE main/AppTask.cpp main/main.cpp main/ZclDoorLockCallbacks.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn index 3b3aed0c92d52b..da940a4717912a 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -74,6 +74,7 @@ mw320_executable("shell_mw320") { ] sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/src/lib/shell/streamer_mw320.cpp", "binding-handler.cpp", diff --git a/examples/all-clusters-app/openiotsdk/CMakeLists.txt b/examples/all-clusters-app/openiotsdk/CMakeLists.txt index 85a53464e64601..56170710a859bc 100644 --- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt +++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt @@ -52,6 +52,7 @@ target_include_directories(${APP_TARGET} target_sources(${APP_TARGET} PRIVATE main/main_ns.cpp + ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON}/src/binding-handler.cpp diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index 584806456e5233..b05baa826f7f22 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -70,7 +70,8 @@ add_definitions( target_sources(app PRIVATE src/AppTask.cpp - src/ZclDoorLockCallbacks.cpp + src/ZclDoorLockCallbacks.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp diff --git a/examples/all-clusters-app/telink/Readme.md b/examples/all-clusters-app/telink/Readme.md index aaea384d83b4c5..6a646341c3e359 100644 --- a/examples/all-clusters-app/telink/Readme.md +++ b/examples/all-clusters-app/telink/Readme.md @@ -11,13 +11,13 @@ creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index ba1cf3a3ca51bd..3e7f1ed6d976da 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -25,6 +25,7 @@ source_set("chip-all-clusters-common") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", ] diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 3c51bc43cabda9..467d15b3be73e4 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull connectedhomeip/chip-build-ameba:latest + $ docker pull ghcr.io/project-chip/chip-build-ameba:latest ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:latest ``` - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/chip_main.cmake b/examples/all-clusters-minimal-app/ameba/chip_main.cmake index d78344f713497e..95b062a636f0a6 100755 --- a/examples/all-clusters-minimal-app/ameba/chip_main.cmake +++ b/examples/all-clusters-minimal-app/ameba/chip_main.cmake @@ -129,6 +129,7 @@ list( APPEND ${list_chip_main_sources} ${chip_dir}/examples/all-clusters-minimal-app/all-clusters-common/src/bridged-actions-stub.cpp + ${chip_dir}/examples/all-clusters-minimal-app/all-clusters-common/src/smco-stub.cpp ${chip_dir}/examples/all-clusters-minimal-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp diff --git a/examples/all-clusters-minimal-app/asr/BUILD.gn b/examples/all-clusters-minimal-app/asr/BUILD.gn index 752062a9b96ebf..f918700d18e314 100755 --- a/examples/all-clusters-minimal-app/asr/BUILD.gn +++ b/examples/all-clusters-minimal-app/asr/BUILD.gn @@ -72,6 +72,7 @@ asr_executable("clusters_minimal_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${examples_plat_dir}/CHIPDeviceManager.cpp", "${examples_plat_dir}/LEDWidget.cpp", diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index d8d00a950ba892..147719a9bc6d81 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -32,6 +32,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" @@ -68,6 +69,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/channel-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/smoke-co-alarm-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn index 970717895d79d8..721b1492d4c1f5 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn @@ -109,6 +109,7 @@ psoc6_executable("clusters_minimal_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${examples_plat_dir}/LEDWidget.cpp", "${examples_plat_dir}/init_psoc6Platform.cpp", diff --git a/examples/all-clusters-minimal-app/linux/BUILD.gn b/examples/all-clusters-minimal-app/linux/BUILD.gn index 24154fe758f958..ea25284906df07 100644 --- a/examples/all-clusters-minimal-app/linux/BUILD.gn +++ b/examples/all-clusters-minimal-app/linux/BUILD.gn @@ -23,6 +23,7 @@ source_set("chip-all-clusters-common") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "AppOptions.cpp", "include/tv-callbacks.cpp", diff --git a/examples/all-clusters-minimal-app/mbed/CMakeLists.txt b/examples/all-clusters-minimal-app/mbed/CMakeLists.txt index dc503a4e9b5970..e50fcef67663f8 100644 --- a/examples/all-clusters-minimal-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/mbed/CMakeLists.txt @@ -60,6 +60,7 @@ target_sources(${APP_TARGET} PRIVATE ${MBED_COMMON}/util/LEDWidget.cpp ${MBED_COMMON}/util/DFUManager.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ) diff --git a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt index 00ecc2ca2fbfc5..2e5c3fbbf1102f 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt @@ -55,6 +55,7 @@ target_include_directories(app PRIVATE target_sources(app PRIVATE main/AppTask.cpp main/main.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp diff --git a/examples/all-clusters-minimal-app/telink/CMakeLists.txt b/examples/all-clusters-minimal-app/telink/CMakeLists.txt index 0d7e3a5313b12b..410f305c3b317a 100644 --- a/examples/all-clusters-minimal-app/telink/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/telink/CMakeLists.txt @@ -70,6 +70,7 @@ add_definitions( target_sources(app PRIVATE src/AppTask.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp diff --git a/examples/all-clusters-minimal-app/telink/Readme.md b/examples/all-clusters-minimal-app/telink/Readme.md index 1051c077a3ed11..5531070453de45 100644 --- a/examples/all-clusters-minimal-app/telink/Readme.md +++ b/examples/all-clusters-minimal-app/telink/Readme.md @@ -11,13 +11,13 @@ for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/all-clusters-minimal-app/tizen/BUILD.gn b/examples/all-clusters-minimal-app/tizen/BUILD.gn index 138c6e9c2e6850..5485fdd469d223 100644 --- a/examples/all-clusters-minimal-app/tizen/BUILD.gn +++ b/examples/all-clusters-minimal-app/tizen/BUILD.gn @@ -25,6 +25,7 @@ source_set("chip-all-clusters-common") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", ] diff --git a/examples/bridge-app/linux/Dockerfile b/examples/bridge-app/linux/Dockerfile index 965e82a664266c..4ee91d7f2f7d98 100644 --- a/examples/bridge-app/linux/Dockerfile +++ b/examples/bridge-app/linux/Dockerfile @@ -15,7 +15,8 @@ # limitations under the License. # -FROM connectedhomeip/chip-cirque-device-base:latest +FROM ghcr.io/project-chip/chip-cirque-device-base:latest +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip COPY out/debug/chip-bridge-app /usr/bin/ COPY entrypoint.sh / diff --git a/examples/bridge-app/telink/README.md b/examples/bridge-app/telink/README.md index 34ce68e54edb3d..9055e4c7c3a669 100644 --- a/examples/bridge-app/telink/README.md +++ b/examples/bridge-app/telink/README.md @@ -88,13 +88,13 @@ defined: 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/chef/README.md b/examples/chef/README.md index ac51d529d19b60..b9218bf5de5d55 100644 --- a/examples/chef/README.md +++ b/examples/chef/README.md @@ -101,7 +101,7 @@ relevant platform image. You can simulate the workflow locally by mounting your CHIP repo into a container and executing the CI command: ```shell -docker run -it --mount source=$(pwd),target=/workspace,type=bind connectedhomeip/chip-build-$PLATFORM:$VERSION +docker run -it --mount source=$(pwd),target=/workspace,type=bind ghcr.io/project-chip/chip-build-$PLATFORM:$VERSION ``` In the container: @@ -128,7 +128,7 @@ chef_$PLATFORM: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-$PLATFORM:$VERSION + image: ghcr.io/project-chip/chip-build-$PLATFORM:$VERSION options: --user root steps: @@ -183,7 +183,7 @@ command for these targets. To test your configuration locally, you may employ a similar strategy as in CI: ```shell -docker run -it --mount source=$(pwd),target=/workspace,type=bind connectedhomeip/chip-build-vscode:$VERSION +docker run -it --mount source=$(pwd),target=/workspace,type=bind ghcr.io/project-chip/chip-build-vscode:$VERSION ``` In the container: diff --git a/examples/chip-tool/Dockerfile b/examples/chip-tool/Dockerfile index c9ec416437e6cb..ef1dec634e3905 100644 --- a/examples/chip-tool/Dockerfile +++ b/examples/chip-tool/Dockerfile @@ -15,7 +15,8 @@ # limitations under the License. # -FROM connectedhomeip/chip-cirque-device-base:latest +FROM ghcr.io/project-chip/chip-cirque-device-base:latest +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip COPY out/debug/chip-tool /usr/bin/ COPY entrypoint.sh / diff --git a/examples/chip-tool/commands/interactive/InteractiveCommands.cpp b/examples/chip-tool/commands/interactive/InteractiveCommands.cpp index 41fcf731ebc7a3..6dae09ce392206 100644 --- a/examples/chip-tool/commands/interactive/InteractiveCommands.cpp +++ b/examples/chip-tool/commands/interactive/InteractiveCommands.cpp @@ -65,6 +65,7 @@ struct InteractiveServerResult { bool mEnabled = false; bool mIsAsyncReport = false; + uint16_t mTimeout = 0; int mStatus = EXIT_SUCCESS; std::vector mResults; std::vector mLogs; @@ -92,18 +93,31 @@ struct InteractiveServerResult // protected by a mutex. std::mutex mMutex; - void Setup(bool isAsyncReport) + void Setup(bool isAsyncReport, uint16_t timeout) { auto lock = ScopedLock(mMutex); mEnabled = true; mIsAsyncReport = isAsyncReport; + mTimeout = timeout; + + if (mIsAsyncReport && mTimeout) + { + chip::DeviceLayer::PlatformMgr().ScheduleWork(StartAsyncTimeout, reinterpret_cast(this)); + } } void Reset() { - auto lock = ScopedLock(mMutex); + auto lock = ScopedLock(mMutex); + + if (mIsAsyncReport && mTimeout) + { + chip::DeviceLayer::PlatformMgr().ScheduleWork(StopAsyncTimeout, reinterpret_cast(this)); + } + mEnabled = false; mIsAsyncReport = false; + mTimeout = 0; mStatus = EXIT_SUCCESS; mResults.clear(); mLogs.clear(); @@ -204,6 +218,24 @@ struct InteractiveServerResult content << "}"; return content.str(); } + + static void StartAsyncTimeout(intptr_t arg) + { + auto self = reinterpret_cast(arg); + auto timeout = chip::System::Clock::Seconds16(self->mTimeout); + chip::DeviceLayer::SystemLayer().StartTimer(timeout, OnAsyncTimeout, self); + } + + static void StopAsyncTimeout(intptr_t arg) + { + auto self = reinterpret_cast(arg); + chip::DeviceLayer::SystemLayer().CancelTimer(OnAsyncTimeout, self); + } + + static void OnAsyncTimeout(chip::System::Layer *, void * appState) + { + RemoteDataModelLogger::LogErrorAsJSON(CHIP_ERROR_TIMEOUT); + } }; InteractiveServerResult gInteractiveServerResult; @@ -263,7 +295,19 @@ CHIP_ERROR InteractiveServerCommand::RunCommand() bool InteractiveServerCommand::OnWebSocketMessageReceived(char * msg) { bool isAsyncReport = strlen(msg) == 0; - gInteractiveServerResult.Setup(isAsyncReport); + uint16_t timeout = 0; + if (!isAsyncReport && strlen(msg) <= 5 /* Only look for numeric values <= 65535 */) + { + std::stringstream ss; + ss << msg; + ss >> timeout; + if (!ss.fail()) + { + isAsyncReport = true; + } + } + + gInteractiveServerResult.Setup(isAsyncReport, timeout); VerifyOrReturnValue(!isAsyncReport, true); auto shouldStop = ParseCommand(msg, &gInteractiveServerResult.mStatus); diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index d5b0401b662269..76dbbcb721cad0 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -111,6 +111,11 @@ CommissioningParameters PairingCommand::GetCommissioningParameters() break; } + if (mCountryCode.HasValue()) + { + params.SetCountryCode(CharSpan::fromCharString(mCountryCode.Value())); + } + return params; } diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index a92ec4d1c67172..0e3dd8024d09cb 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -158,6 +158,12 @@ class PairingCommand : public CHIPCommand, break; } + if (mode != PairingMode::None) + { + AddArgument("country-code", &mCountryCode, + "Country code to use to set the Basic Information cluster's Location attribute"); + } + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -203,6 +209,7 @@ class PairingCommand : public CHIPCommand, chip::Optional mSkipCommissioningComplete; chip::Optional mBypassAttestationVerifier; chip::Optional> mCASEAuthTags; + chip::Optional mCountryCode; uint16_t mRemotePort; uint16_t mDiscriminator; uint32_t mSetupPINCode; diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py index 7371fb6b0fa3bb..8340289c0e2852 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py @@ -197,7 +197,7 @@ def encode(self, request): command, command_specifier = self.__get_command_name(request) if command == 'wait-for-report': - return '' + return str(request.timeout) if request.timeout is not None else '' arguments = self.__get_arguments(request) base64_arguments = base64.b64encode( @@ -270,6 +270,8 @@ def __get_arguments(self, request): arguments, request.max_interval, "max-interval") arguments = self.__maybe_add(arguments, request.timed_interaction_timeout_ms, "timedInteractionTimeoutMs") + arguments = self.__maybe_add( + arguments, request.timeout, "timeout") arguments = self.__maybe_add( arguments, request.event_number, "event-min") arguments = self.__maybe_add( diff --git a/examples/contact-sensor-app/telink/README.md b/examples/contact-sensor-app/telink/README.md index 68475be1d69c9b..22933e4fd4f4ba 100755 --- a/examples/contact-sensor-app/telink/README.md +++ b/examples/contact-sensor-app/telink/README.md @@ -9,13 +9,13 @@ You can use this example as a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h index 34ad517075fb36..4ca6c4c2b73582 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h @@ -74,6 +74,12 @@ class PairingCommandBridge : public CHIPCommandBridge break; } + if (mode != PairingMode::None) + { + AddArgument("country-code", &mCountryCode, + "Country code to use to set the Basic Information cluster's Location attribute"); + } + AddArgument("use-device-attestation-delegate", 0, 1, &mUseDeviceAttestationDelegate, "If true, use a device attestation delegate that always wants to be notified about attestation results. " "Defaults to false."); @@ -104,4 +110,5 @@ class PairingCommandBridge : public CHIPCommandBridge char * mOnboardingPayload; chip::Optional mUseDeviceAttestationDelegate; chip::Optional mDeviceAttestationFailsafeTime; + chip::Optional mCountryCode; }; diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm index 316f1705e91363..2ab95a9f5b5e68 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm @@ -74,6 +74,10 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle } } + if (mCountryCode.HasValue()) { + params.countryCode = [NSString stringWithUTF8String:mCountryCode.Value()]; + } + [deviceControllerDelegate setCommandBridge:this]; [deviceControllerDelegate setParams:params]; [deviceControllerDelegate setCommissioner:commissioner]; diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index db8f7f38dd88fb..f20fb1683d75ea 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -31,6 +31,8 @@ "Test_TC_ACL_2_9", "Test_TC_ACL_2_10", "DL_LockUnlock", + "Disabled due to OperationalState not being enabled in Matter.framework for now:", + "TestOperationalState", "Disabled due to using ICD Management (ICDManagement) cluster, which is provisional on Darwin for now:", "TestIcdManagementCluster", "Test_TC_ICDM_1_1", @@ -112,6 +114,8 @@ "Test_TC_ACFREMON_2_1", "Disabled due to HEPAFilterMonitoring not being enabled in Matter.framework for now:", "Test_TC_HEPAFREMON_1_1", - "Test_TC_HEPAFREMON_2_1" + "Test_TC_HEPAFREMON_2_1", + "Disabled due to Events verification not supported", + "Test_TC_BINFO_2_2" ] } diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 9959ff0c1f8581..8c24568a1b54d2 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull connectedhomeip/chip-build-ameba:latest + $ docker pull ghcr.io/project-chip/chip-build-ameba:latest - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:latest - Setup build environment: diff --git a/examples/light-switch-app/telink/README.md b/examples/light-switch-app/telink/README.md index 76f62c6db681ee..32429c84743f9c 100755 --- a/examples/light-switch-app/telink/README.md +++ b/examples/light-switch-app/telink/README.md @@ -14,13 +14,13 @@ creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index 77b7fb016b644a..45c30db736070f 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull connectedhomeip/chip-build-ameba:latest + $ docker pull ghcr.io/project-chip/chip-build-ameba:latest - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:latest - Setup build environment: diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index d16e58ac627b66..5fd41b4d42890b 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -5439,8 +5439,8 @@ }, { "name": "MA-extendedcolorlight", - "deviceTypeName": "MA-dimmablelight", - "deviceTypeCode": 257, + "deviceTypeName": "MA-extendedcolorlight", + "deviceTypeCode": 269, "deviceTypeProfileId": 259, "clusters": [ { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index 8a0a84180b20ff..89acd7f87f9e78 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -5439,8 +5439,8 @@ }, { "name": "MA-extendedcolorlight", - "deviceTypeName": "MA-dimmablelight", - "deviceTypeCode": 257, + "deviceTypeName": "MA-extendedcolorlight", + "deviceTypeCode": 269, "deviceTypeProfileId": 259, "clusters": [ { diff --git a/examples/lighting-app/linux/Dockerfile b/examples/lighting-app/linux/Dockerfile index 14daa71ae25332..b84e9913800075 100644 --- a/examples/lighting-app/linux/Dockerfile +++ b/examples/lighting-app/linux/Dockerfile @@ -15,7 +15,8 @@ # limitations under the License. # -FROM connectedhomeip/chip-cirque-device-base:latest +FROM ghcr.io/project-chip/chip-cirque-device-base:latest +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip COPY out/debug/chip-lighting-app /usr/bin/ COPY entrypoint.sh / diff --git a/examples/lighting-app/telink/README.md b/examples/lighting-app/telink/README.md index ddb536496e77bc..a76f539f0f2b17 100644 --- a/examples/lighting-app/telink/README.md +++ b/examples/lighting-app/telink/README.md @@ -12,13 +12,13 @@ a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/lock-app/telink/README.md b/examples/lock-app/telink/README.md index d6eefac21b5fdd..2715a195d3b387 100755 --- a/examples/lock-app/telink/README.md +++ b/examples/lock-app/telink/README.md @@ -12,13 +12,13 @@ a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index 029cbed876b7ba..ef18e95eabbf8d 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull connectedhomeip/chip-build-ameba:latest + $ docker pull ghcr.io/project-chip/chip-build-ameba:latest - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:latest - Setup build environment: diff --git a/examples/ota-requestor-app/telink/Readme.md b/examples/ota-requestor-app/telink/Readme.md index b1f2947a4e3a1b..aa5060c0b18172 100755 --- a/examples/ota-requestor-app/telink/Readme.md +++ b/examples/ota-requestor-app/telink/Readme.md @@ -5,13 +5,13 @@ 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 09319a508b4bc8..8e3e2513c05550 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull connectedhomeip/chip-build-ameba:latest + $ docker pull ghcr.io/project-chip/chip-build-ameba:latest - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:latest - Setup build environment: diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 3bbb9c88711261..e673fc4d80d32c 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6439,7 +6439,7 @@ server cluster AccountLogin = 1294 { } endpoint 0 { - device type anonymousEndpointType = 65280, version 1; + device type rootdevice = 22, version 1; binding cluster GeneralCommissioning; binding cluster ThreadNetworkDiagnostics; binding cluster Switch; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index bbeb49c3caa504..2565d5b7266e59 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -33,10 +33,10 @@ ], "endpointTypes": [ { - "name": "Anonymous Endpoint Type", - "deviceTypeName": null, - "deviceTypeCode": null, - "deviceTypeProfileId": null, + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, "clusters": [ { "name": "Descriptor", @@ -14559,7 +14559,7 @@ "endpointId": 0, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 65280 + "deviceIdentifier": 22 }, { "endpointTypeName": "Anonymous Endpoint Type", diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 29b00565f2a669..fb9da67813c8f8 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6398,7 +6398,7 @@ server cluster AccountLogin = 1294 { } endpoint 0 { - device type anonymousEndpointType = 65280, version 1; + device type rootdevice = 22, version 1; binding cluster GeneralCommissioning; binding cluster ThreadNetworkDiagnostics; binding cluster Switch; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index f46be658e99f5f..333648b408f972 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -33,10 +33,10 @@ ], "endpointTypes": [ { - "name": "Anonymous Endpoint Type", - "deviceTypeName": null, - "deviceTypeCode": null, - "deviceTypeProfileId": null, + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, "clusters": [ { "name": "Descriptor", @@ -14585,7 +14585,7 @@ "endpointId": 0, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 65280 + "deviceIdentifier": 22 }, { "endpointTypeName": "Anonymous Endpoint Type", diff --git a/examples/platform/ameba/route_hook/ameba_route_hook.c b/examples/platform/ameba/route_hook/ameba_route_hook.c index 0be1f71f359934..66cbfcbbb71a71 100644 --- a/examples/platform/ameba/route_hook/ameba_route_hook.c +++ b/examples/platform/ameba/route_hook/ameba_route_hook.c @@ -140,7 +140,7 @@ static uint8_t icmp6_raw_recv_handler(void * arg, struct raw_pcb * pcb, struct p } icmp_payload_len = p->tot_len - sizeof(struct ip6_hdr); - icmp_payload = p->payload + sizeof(struct ip6_hdr); + icmp_payload = (uint8_t *) p->payload + sizeof(struct ip6_hdr); icmp6_header = (struct icmp6_hdr *) icmp_payload; if (icmp6_header->type == ICMP6_TYPE_RA) diff --git a/examples/platform/nrfconnect/util/ICDUtil.cpp b/examples/platform/nrfconnect/util/ICDUtil.cpp index fd2130c6c22dcb..b3dc9c80bbc9dd 100644 --- a/examples/platform/nrfconnect/util/ICDUtil.cpp +++ b/examples/platform/nrfconnect/util/ICDUtil.cpp @@ -36,5 +36,5 @@ CHIP_ERROR ICDUtil::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandle agreedMaxInterval = kSubscriptionMaxIntervalPublisherLimit; } - return aReadHandler.SetReportingIntervals(agreedMaxInterval); + return aReadHandler.SetMaxReportingInterval(agreedMaxInterval); } diff --git a/examples/platform/silabs/ICDSubscriptionCallback.cpp b/examples/platform/silabs/ICDSubscriptionCallback.cpp index 735246f042af87..eba28968085d60 100644 --- a/examples/platform/silabs/ICDSubscriptionCallback.cpp +++ b/examples/platform/silabs/ICDSubscriptionCallback.cpp @@ -61,5 +61,5 @@ CHIP_ERROR ICDSubscriptionCallback::OnSubscriptionRequested(chip::app::ReadHandl decidedMaxInterval = maximumMaxInterval; } - return aReadHandler.SetReportingIntervals(decidedMaxInterval); + return aReadHandler.SetMaxReportingInterval(decidedMaxInterval); } diff --git a/examples/platform/silabs/efr32/uart.cpp b/examples/platform/silabs/efr32/uart.cpp index 183417b3cc128f..1576e67f4fc907 100644 --- a/examples/platform/silabs/efr32/uart.cpp +++ b/examples/platform/silabs/efr32/uart.cpp @@ -28,7 +28,9 @@ extern "C" { #include "assert.h" #include "em_core.h" #include "em_usart.h" +#ifdef SL_BOARD_NAME #include "sl_board_control.h" +#endif #include "sl_uartdrv_instances.h" #ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT #include "sl_uartdrv_eusart_vcom_config.h" @@ -252,7 +254,9 @@ void uartConsoleInit(void) return; } +#ifdef SL_BOARD_NAME sl_board_enable_vcom(); +#endif // Init a fifo for the data received on the uart InitFifo(&sReceiveFifo, sRxFifoBuffer, MAX_BUFFER_SIZE); diff --git a/examples/pump-app/telink/README.md b/examples/pump-app/telink/README.md index 19bdcc291e5fb6..9fb9ca20b2ee1b 100755 --- a/examples/pump-app/telink/README.md +++ b/examples/pump-app/telink/README.md @@ -13,13 +13,13 @@ reference for creating your own pump application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/pump-controller-app/telink/README.md b/examples/pump-controller-app/telink/README.md index 253b676e7392fa..bbf5ced1975488 100755 --- a/examples/pump-controller-app/telink/README.md +++ b/examples/pump-controller-app/telink/README.md @@ -14,13 +14,13 @@ your own pump application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/entrypoint.sh b/examples/resource-monitoring-app/linux/.gn old mode 100755 new mode 100644 similarity index 59% rename from integrations/docker/ci-only-images/chip-cirque-device-base/entrypoint.sh rename to examples/resource-monitoring-app/linux/.gn index a0235ee1e7dd81..5d1ce757507582 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/entrypoint.sh +++ b/examples/resource-monitoring-app/linux/.gn @@ -1,21 +1,25 @@ -#!/usr/bin/env bash - -# -# Copyright (c) 2021 Project CHIP Authors +# 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 +# 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. -# -service dbus start -service avahi-daemon start -/bin/CHIPCirqueDaemon.py --server otbr-agent +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + import("//args.gni") +} diff --git a/examples/resource-monitoring-app/linux/BUILD.gn b/examples/resource-monitoring-app/linux/BUILD.gn new file mode 100644 index 00000000000000..98301831b1b4a4 --- /dev/null +++ b/examples/resource-monitoring-app/linux/BUILD.gn @@ -0,0 +1,61 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") + +import("${chip_root}/build/chip/tools.gni") +import("${chip_root}/src/app/common_flags.gni") + +assert(chip_build_tools) + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") + +config("includes") { + include_dirs = [ + ".", + "include", + ] +} + +executable("chip-resource-monitoring-app") { + sources = [ + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp", + "include/CHIPProjectAppConfig.h", + "src/main.cpp", + ] + + deps = [ + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common:instances", + "${chip_root}/src/lib", + ] + + include_dirs = [ "include" ] + + # The system_rpc_server.cc file is in pigweed and doesn't compile with + # -Wconversion, remove check for RPC build only. + cflags = [ "-Wconversion" ] + + output_dir = root_out_dir +} + +group("linux") { + deps = [ ":chip-resource-monitoring-app" ] +} + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/resource-monitoring-app/linux/Dockerfile b/examples/resource-monitoring-app/linux/Dockerfile new file mode 100644 index 00000000000000..12edb66a4cabc2 --- /dev/null +++ b/examples/resource-monitoring-app/linux/Dockerfile @@ -0,0 +1,23 @@ +# +# Copyright (c) 2020-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. +# + +FROM connectedhomeip/chip-cirque-device-base:latest + +COPY out/debug/chip-resource-monitoring-app /usr/bin/ +COPY entrypoint.sh / + +ENTRYPOINT ["/entrypoint.sh", "server"] diff --git a/examples/resource-monitoring-app/linux/README.md b/examples/resource-monitoring-app/linux/README.md new file mode 100644 index 00000000000000..ae025e1be261dc --- /dev/null +++ b/examples/resource-monitoring-app/linux/README.md @@ -0,0 +1,12 @@ +# CHIP Linux Resource Monitoring Example + +This is a example app showing the use of the resource monitoring clusters (HEPA +Filter Monitoring and Activated Carbon Filter Monitoring). + +## Building + +The application could be build in the same manner as `all-clusters-app`: + +``` +? scripts/examples/gn_build_example.sh examples/resource-monitoring-app/linux out/resource-monitoring-app +``` diff --git a/examples/resource-monitoring-app/linux/args.gni b/examples/resource-monitoring-app/linux/args.gni new file mode 100644 index 00000000000000..22c26955822720 --- /dev/null +++ b/examples/resource-monitoring-app/linux/args.gni @@ -0,0 +1,27 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# CHIPProjectConfig.h + +import("//build_overrides/chip.gni") + +import("${chip_root}/config/standalone/args.gni") + +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_system_project_config_include = "" + +chip_project_config_include_dirs = + [ "${chip_root}/examples/lighting-app/linux/include" ] +chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] diff --git a/examples/resource-monitoring-app/linux/build_overrides b/examples/resource-monitoring-app/linux/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/resource-monitoring-app/linux/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/resource-monitoring-app/linux/entrypoint.sh b/examples/resource-monitoring-app/linux/entrypoint.sh new file mode 100755 index 00000000000000..0fc9527c0cfb6d --- /dev/null +++ b/examples/resource-monitoring-app/linux/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +service dbus start +sleep 1 +service avahi-daemon start +/usr/sbin/otbr-agent -I wpan0 spinel+hdlc+uart:///dev/ttyUSB0 & +sleep 1 +ot-ctl panid 0x1234 +ot-ctl ifconfig up +ot-ctl thread start + +chip-resource-monitoring-app --thread diff --git a/examples/resource-monitoring-app/linux/include/CHIPProjectAppConfig.h b/examples/resource-monitoring-app/linux/include/CHIPProjectAppConfig.h new file mode 100644 index 00000000000000..94b3c4dc2a79d5 --- /dev/null +++ b/examples/resource-monitoring-app/linux/include/CHIPProjectAppConfig.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2020 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// include the CHIPProjectConfig from config/standalone +#include + +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 45 // 0x002D = 45 == Air Purifer + +#define CHIP_DEVICE_CONFIG_DEVICE_NAME "Test Resource Monitoring Device" diff --git a/examples/resource-monitoring-app/linux/src/main.cpp b/examples/resource-monitoring-app/linux/src/main.cpp new file mode 100644 index 00000000000000..ebe10708926a55 --- /dev/null +++ b/examples/resource-monitoring-app/linux/src/main.cpp @@ -0,0 +1,58 @@ +/* + * + * Copyright (c) 2020 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. + */ + +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ResourceMonitoring; + +constexpr std::bitset<4> gHepaFilterFeatureMap{ static_cast(Feature::kCondition) | + static_cast(Feature::kWarning) }; +constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(Feature::kCondition) | + static_cast(Feature::kWarning) }; + +static HepaFilterMonitoringInstance HepafilterInstance(0x1, static_cast(gHepaFilterFeatureMap.to_ulong()), + DegradationDirectionEnum::kDown, true); +static ActivatedCarbonFilterMonitoringInstance + ActivatedCarbonFilterInstance(0x1, static_cast(gActivatedCarbonFeatureMap.to_ulong()), + DegradationDirectionEnum::kDown, true); + +void ApplicationInit() +{ + HepafilterInstance.Init(); + ActivatedCarbonFilterInstance.Init(); +} + +int main(int argc, char * argv[]) +{ + if (ChipLinuxAppInit(argc, argv) != 0) + { + return -1; + } + + ChipLinuxAppMainLoop(); + + return 0; +} diff --git a/examples/resource-monitoring-app/linux/third_party/connectedhomeip b/examples/resource-monitoring-app/linux/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/resource-monitoring-app/linux/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/integrations/docker/images/build-all.sh b/examples/resource-monitoring-app/resource-monitoring-common/BUILD.gn old mode 100755 new mode 100644 similarity index 54% rename from integrations/docker/images/build-all.sh rename to examples/resource-monitoring-app/resource-monitoring-common/BUILD.gn index 4aff2747ed571a..9156c450353a66 --- a/integrations/docker/images/build-all.sh +++ b/examples/resource-monitoring-app/resource-monitoring-common/BUILD.gn @@ -1,28 +1,32 @@ -#!/usr/bin/env bash - -# # 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 +# 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. -# -# -# temporary wrapper build script until we can build something better -# https://github.com/project-chip/connectedhomeip/issues/710 -# -set -e -find "$(git rev-parse --show-toplevel)"/integrations/docker/images/ -name Dockerfile ! -path "*chip-cert-bins/*" | while read -r dockerfile; do - pushd "$(dirname "$dockerfile")" >/dev/null - ./build.sh "$@" - popd >/dev/null -done +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") + +config("config") { + include_dirs = [ "include" ] +} + +source_set("instances") { + public_configs = [ ":config" ] +} + +chip_data_model("resource-monitoring-common") { + zap_file = "resource-monitoring-app.zap" + + zap_pregenerated_dir = + "${chip_root}/zzz_generated/resource-monitoring-app/zap-generated" + is_server = true +} diff --git a/examples/resource-monitoring-app/resource-monitoring-common/include/instances/ActivatedCarbonFilterMonitoring.h b/examples/resource-monitoring-app/resource-monitoring-common/include/instances/ActivatedCarbonFilterMonitoring.h new file mode 100644 index 00000000000000..a077a6b9a7209f --- /dev/null +++ b/examples/resource-monitoring-app/resource-monitoring-common/include/instances/ActivatedCarbonFilterMonitoring.h @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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 +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace ResourceMonitoring { + +/// This is an application level Instance to handle ActivatedCarbonfilterMonitoringInstance commands according to the specific +/// business logic. +class ActivatedCarbonFilterMonitoringInstance : public ResourceMonitoring::Instance +{ +private: + CHIP_ERROR AppInit() override; + chip::Protocols::InteractionModel::Status PreResetCondition() override; + chip::Protocols::InteractionModel::Status PostResetCondition() override; + +public: + ActivatedCarbonFilterMonitoringInstance( + EndpointId aEndpointId, uint32_t aFeature, + ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, + bool aResetConditionCommandSupported) : + Instance(aEndpointId, ActivatedCarbonFilterMonitoring::Id, aFeature, aDegradationDirection, + aResetConditionCommandSupported){}; +}; + +} // namespace ResourceMonitoring +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/resource-monitoring-app/resource-monitoring-common/include/instances/HepaFilterMonitoring.h b/examples/resource-monitoring-app/resource-monitoring-common/include/instances/HepaFilterMonitoring.h new file mode 100644 index 00000000000000..a5ef89785e0a35 --- /dev/null +++ b/examples/resource-monitoring-app/resource-monitoring-common/include/instances/HepaFilterMonitoring.h @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2023 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 +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace ResourceMonitoring { + +/// This is an application level instance to handle HepaFilterMonitoringInstance commands according to the specific business logic. +class HepaFilterMonitoringInstance : public ResourceMonitoring::Instance +{ +private: + CHIP_ERROR AppInit() override; + chip::Protocols::InteractionModel::Status PreResetCondition() override; + chip::Protocols::InteractionModel::Status PostResetCondition() override; + +public: + HepaFilterMonitoringInstance(EndpointId aEndpointId, uint32_t aFeature, + ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, + bool aResetConditionCommandSupported) : + Instance(aEndpointId, HepaFilterMonitoring::Id, aFeature, aDegradationDirection, aResetConditionCommandSupported){}; +}; + +} // namespace ResourceMonitoring +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter new file mode 100644 index 00000000000000..33710cbe1c87ed --- /dev/null +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -0,0 +1,2023 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + enum EffectIdentifierEnum : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : ENUM8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : ENUM8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +server cluster AccessControl = 31 { + enum AccessControlEntryAuthModeEnum : ENUM8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Provides an interface for providing OTA software updates */ +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct QueryImageRequest { + vendor_id vendorID = 0; + INT16U productID = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING<2> location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + nullable INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + attribute HourFormatEnum hourFormat = 0; + attribute CalendarTypeEnum activeCalendarType = 1; + readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + enum CommissioningErrorEnum : ENUM8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatusEnum : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : ENUM8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : BITMAP32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING<32> ssid = 0; + optional INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster GeneralDiagnostics = 51 { + enum BootReasonEnum : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING<16> enableKey = 0; + INT64U eventTrigger = 1; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster SoftwareDiagnostics = 52 { + bitmap Feature : BITMAP32 { + kWaterMarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + INT64U id = 0; + optional CHAR_STRING name = 1; + optional OCTET_STRING faultRecording = 2; + } + + readonly attribute ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +server cluster ThreadNetworkDiagnostics = 53 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + struct RouteTableStruct { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int8u weighting = 10; + readonly attribute nullable int8u dataVersion = 11; + readonly attribute nullable int8u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute nullable int64u activeTimestamp = 56; + readonly attribute nullable int64u pendingTimestamp = 57; + readonly attribute nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCauseEnum : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : ENUM8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute nullable int32u beaconLostCount = 5; + readonly attribute nullable int32u beaconRxCount = 6; + readonly attribute nullable int32u packetMulticastRxCount = 7; + readonly attribute nullable int32u packetMulticastTxCount = 8; + readonly attribute nullable int32u packetUnicastRxCount = 9; + readonly attribute nullable int32u packetUnicastTxCount = 10; + readonly attribute nullable int64u currentMaxRate = 11; + readonly attribute nullable int64u overrunCount = 12; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +/** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateEnum : ENUM8 { + kRate10M = 0; + kRate100M = 1; + kRate1G = 2; + kRate25G = 3; + kRate5G = 4; + kRate10G = 5; + kRate40G = 6; + kRate100G = 7; + kRate200G = 8; + kRate400G = 9; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + readonly attribute nullable PHYRateEnum PHYRate = 0; + readonly attribute nullable boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute nullable boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. +Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ +server cluster Switch = 59 { + bitmap Feature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U previousPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEPasscodeVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +server cluster OperationalCredentials = 62 { + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +server cluster FixedLabel = 64 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + readonly attribute LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ +server cluster UserLabel = 65 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes and commands for monitoring HEPA filters in a device */ +server cluster HepaFilterMonitoring = 113 { + enum ChangeIndicationEnum : ENUM8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum DegradationDirectionEnum : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum ProductIdentifierTypeEnum : ENUM8 { + kUPC = 0; + kGTIN8 = 1; + kEAN = 2; + kGTIN14 = 3; + kOEM = 4; + } + + bitmap Feature : BITMAP32 { + kCondition = 0x1; + kWarning = 0x2; + } + + struct ReplacementProductStruct { + ProductIdentifierTypeEnum productIdentifierType = 0; + char_string<20> productIdentifierValue = 1; + } + + readonly attribute percent condition = 0; + readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute ChangeIndicationEnum changeIndication = 2; + readonly attribute boolean inPlaceIndicator = 3; + attribute nullable epoch_s lastChangedTime = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCondition(): DefaultSuccess = 0; +} + +/** Attributes and commands for monitoring activated carbon filters in a device */ +server cluster ActivatedCarbonFilterMonitoring = 114 { + enum ChangeIndicationEnum : ENUM8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum DegradationDirectionEnum : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum ProductIdentifierTypeEnum : ENUM8 { + kUPC = 0; + kGTIN8 = 1; + kEAN = 2; + kGTIN14 = 3; + kOEM = 4; + } + + bitmap Feature : BITMAP32 { + kCondition = 0x1; + kWarning = 0x2; + } + + struct ReplacementProductStruct { + ProductIdentifierTypeEnum productIdentifierType = 0; + char_string<20> productIdentifierValue = 1; + } + + readonly attribute percent condition = 0; + readonly attribute DegradationDirectionEnum degradationDirection = 1; + readonly attribute ChangeIndicationEnum changeIndication = 2; + readonly attribute boolean inPlaceIndicator = 3; + attribute nullable epoch_s lastChangedTime = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCondition(): DefaultSuccess = 0; +} + +/** An interface for controlling a fan in a heating/cooling system. */ +server cluster FanControl = 514 { + enum AirflowDirectionEnum : ENUM8 { + kForward = 0; + kReverse = 1; + } + + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; + } + + enum FanModeSequenceEnum : ENUM8 { + kOffLowMedHigh = 0; + kOffLowHigh = 1; + kOffLowMedHighAuto = 2; + kOffLowHighAuto = 3; + kOffOnAuto = 4; + kOffOn = 5; + } + + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; + } + + bitmap Feature : BITMAP32 { + kMultiSpeed = 0x1; + kAuto = 0x2; + kRocking = 0x4; + kWind = 0x8; + kStep = 0x10; + kAirflowDirection = 0x20; + } + + bitmap RockBitmap : BITMAP8 { + kRockLeftRight = 0x1; + kRockUpDown = 0x2; + kRockRound = 0x4; + } + + bitmap WindBitmap : BITMAP8 { + kSleepWind = 0x1; + kNaturalWind = 0x2; + } + + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 4; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders default = 0; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster LocalizationConfiguration { + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat default = 0; + persist attribute activeCalendarType default = 0; + callback attribute supportedCalendarTypes; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree default = 0x0000000000000000; + callback attribute currentHeapUsed default = 0x0000000000000000; + callback attribute currentHeapHighWatermark default = 0x0000000000000000; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName default = "0"; + callback attribute panId default = 0x0000; + callback attribute extendedPanId default = 0x0000000000000000; + callback attribute meshLocalPrefix; + callback attribute overrunCount default = 0x0000000000000000; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount default = 0x0000; + callback attribute childRoleCount default = 0x0000; + callback attribute routerRoleCount default = 0x0000; + callback attribute leaderRoleCount default = 0x0000; + callback attribute attachAttemptCount default = 0x0000; + callback attribute partitionIdChangeCount default = 0x0000; + callback attribute betterPartitionAttachAttemptCount default = 0x0000; + callback attribute parentChangeCount default = 0x0000; + callback attribute txTotalCount default = 0x0000; + callback attribute txUnicastCount default = 0x0000; + callback attribute txBroadcastCount default = 0x0000; + callback attribute txAckRequestedCount default = 0x0000; + callback attribute txAckedCount default = 0x0000; + callback attribute txNoAckRequestedCount default = 0x0000; + callback attribute txDataCount default = 0x0000; + callback attribute txDataPollCount default = 0x0000; + callback attribute txBeaconCount default = 0x0000; + callback attribute txBeaconRequestCount default = 0x0000; + callback attribute txOtherCount default = 0x0000; + callback attribute txRetryCount default = 0x0000; + callback attribute txDirectMaxRetryExpiryCount default = 0x0000; + callback attribute txIndirectMaxRetryExpiryCount default = 0x0000; + callback attribute txErrCcaCount default = 0x0000; + callback attribute txErrAbortCount default = 0x0000; + callback attribute txErrBusyChannelCount default = 0x0000; + callback attribute rxTotalCount default = 0x0000; + callback attribute rxUnicastCount default = 0x0000; + callback attribute rxBroadcastCount default = 0x0000; + callback attribute rxDataCount default = 0x0000; + callback attribute rxDataPollCount default = 0x0000; + callback attribute rxBeaconCount default = 0x0000; + callback attribute rxBeaconRequestCount default = 0x0000; + callback attribute rxOtherCount default = 0x0000; + callback attribute rxAddressFilteredCount default = 0x0000; + callback attribute rxDestAddrFilteredCount default = 0x0000; + callback attribute rxDuplicatedCount default = 0x0000; + callback attribute rxErrNoFrameCount default = 0x0000; + callback attribute rxErrUnknownNeighborCount default = 0x0000; + callback attribute rxErrInvalidSrcAddrCount default = 0x0000; + callback attribute rxErrSecCount default = 0x0000; + callback attribute rxErrFcsCount default = 0x0000; + callback attribute rxErrOtherCount default = 0x0000; + callback attribute activeTimestamp default = 0x0000000000000000; + callback attribute pendingTimestamp default = 0x0000000000000000; + callback attribute delay default = 0x0000; + callback attribute securityPolicy; + callback attribute channelPage0Mask default = "0x0000"; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 1; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + callback attribute beaconLostCount default = 0x00000000; + callback attribute beaconRxCount default = 0x00000000; + callback attribute packetMulticastRxCount default = 0x00000000; + callback attribute packetMulticastTxCount default = 0x00000000; + callback attribute packetUnicastRxCount default = 0x00000000; + callback attribute packetUnicastTxCount default = 0x00000000; + callback attribute currentMaxRate default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster EthernetNetworkDiagnostics { + callback attribute PHYRate; + callback attribute fullDuplex default = 0x00; + callback attribute packetRxCount default = 0x0000000000000000; + callback attribute packetTxCount default = 0x0000000000000000; + callback attribute txErrCount default = 0x0000000000000000; + callback attribute collisionCount default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + callback attribute carrierDetect default = 0x00; + callback attribute timeSinceReset default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 43, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster HepaFilterMonitoring { + callback attribute condition; + callback attribute degradationDirection; + callback attribute changeIndication default = 0; + callback attribute inPlaceIndicator; + callback attribute lastChangedTime; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster ActivatedCarbonFilterMonitoring { + callback attribute condition; + callback attribute degradationDirection; + callback attribute changeIndication default = 0; + callback attribute inPlaceIndicator; + callback attribute lastChangedTime; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster FanControl { + ram attribute fanMode default = 0; + ram attribute fanModeSequence default = 2; + ram attribute percentSetting default = 0; + ram attribute percentCurrent default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap new file mode 100644 index 00000000000000..28fa23e068c377 --- /dev/null +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap @@ -0,0 +1,9308 @@ +{ + "featureLevel": 96, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + } + ], + "endpointTypes": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-fan", + "deviceTypeCode": 43, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "HEPA Filter Monitoring", + "code": 113, + "mfgCode": null, + "define": "HEPA_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "HEPA Filter Monitoring", + "code": 113, + "mfgCode": null, + "define": "HEPA_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Activated Carbon Filter Monitoring", + "code": 114, + "mfgCode": null, + "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Activated Carbon Filter Monitoring", + "code": 114, + "mfgCode": null, + "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ceramic Filter Monitoring", + "code": 115, + "mfgCode": null, + "define": "CERAMIC_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ceramic Filter Monitoring", + "code": 115, + "mfgCode": null, + "define": "CERAMIC_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Electrostatic Filter Monitoring", + "code": 116, + "mfgCode": null, + "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Electrostatic Filter Monitoring", + "code": 116, + "mfgCode": null, + "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "UV Filter Monitoring", + "code": 117, + "mfgCode": null, + "define": "UV_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "UV Filter Monitoring", + "code": 117, + "mfgCode": null, + "define": "UV_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ionizing Filter Monitoring", + "code": 118, + "mfgCode": null, + "define": "IONIZING_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ionizing Filter Monitoring", + "code": 118, + "mfgCode": null, + "define": "IONIZING_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Zeolite Filter Monitoring", + "code": 119, + "mfgCode": null, + "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Zeolite Filter Monitoring", + "code": 119, + "mfgCode": null, + "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ozone Filter Monitoring", + "code": 120, + "mfgCode": null, + "define": "OZONE_FILTER_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ozone Filter Monitoring", + "code": 120, + "mfgCode": null, + "define": "OZONE_FILTER_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Water Tank Monitoring", + "code": 121, + "mfgCode": null, + "define": "WATER_TANK_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Water Tank Monitoring", + "code": 121, + "mfgCode": null, + "define": "WATER_TANK_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fuel Tank Monitoring", + "code": 122, + "mfgCode": null, + "define": "FUEL_TANK_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fuel Tank Monitoring", + "code": 122, + "mfgCode": null, + "define": "FUEL_TANK_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ink Cartridge Monitoring", + "code": 123, + "mfgCode": null, + "define": "INK_CARTRIDGE_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Ink Cartridge Monitoring", + "code": 123, + "mfgCode": null, + "define": "INK_CARTRIDGE_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Toner Cartridge Monitoring", + "code": 124, + "mfgCode": null, + "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCondition", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Toner Cartridge Monitoring", + "code": 124, + "mfgCode": null, + "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Condition", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DegradationDirection", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DegradationDirectionEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChangeIndication", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ChangeIndicationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InPlaceIndicator", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastChangedTime", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "FanMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "FanModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FanModeSequence", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "FanModeSequenceEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentSetting", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentCurrent", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedMax", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedSetting", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSupport", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSetting", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSupport", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSetting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 43 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp b/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp new file mode 100644 index 00000000000000..f22c9590e1c8c3 --- /dev/null +++ b/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ActivatedCarbonFilterMonitoring; +using namespace chip::app::Clusters::ResourceMonitoring; +using chip::Protocols::InteractionModel::Status; + +//-- Hepa filter Monitoring Instance methods +CHIP_ERROR ActivatedCarbonFilterMonitoringInstance::AppInit() +{ + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::Init()"); + return CHIP_NO_ERROR; +} + +Status ActivatedCarbonFilterMonitoringInstance::PreResetCondition() +{ + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PreResetCondition()"); + return Status::Success; +} + +Status ActivatedCarbonFilterMonitoringInstance::PostResetCondition() +{ + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PostResetCondition()"); + return Status::Success; +} diff --git a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp b/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp new file mode 100644 index 00000000000000..ae93411a38b902 --- /dev/null +++ b/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::HepaFilterMonitoring; +using namespace chip::app::Clusters::ResourceMonitoring; +using chip::Protocols::InteractionModel::Status; + +//-- Hepa filter Monitoring instance methods +CHIP_ERROR HepaFilterMonitoringInstance::AppInit() +{ + ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::Init()"); + return CHIP_NO_ERROR; +} + +Status HepaFilterMonitoringInstance::PreResetCondition() +{ + ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PreResetCondition()"); + return Status::Success; +} + +Status HepaFilterMonitoringInstance::PostResetCondition() +{ + ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PostResetCondition()"); + return Status::Success; +} diff --git a/examples/shell/cc13x2x7_26x2x7/BUILD.gn b/examples/shell/cc13x2x7_26x2x7/BUILD.gn index 691853a6f8ebc8..45351e854e6150 100644 --- a/examples/shell/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/shell/cc13x2x7_26x2x7/BUILD.gn @@ -76,6 +76,7 @@ ti_simplelink_executable("shell_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "main/AppTask.cpp", "main/main.cpp", diff --git a/examples/shell/shell_common/BUILD.gn b/examples/shell/shell_common/BUILD.gn index efd5d74944a4e6..67aaeb9c91abd8 100644 --- a/examples/shell/shell_common/BUILD.gn +++ b/examples/shell/shell_common/BUILD.gn @@ -65,6 +65,7 @@ static_library("shell_common") { sources += [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", ] diff --git a/examples/smoke-co-alarm-app/silabs/BUILD.gn b/examples/smoke-co-alarm-app/silabs/BUILD.gn index c105d95546b958..d4ebe73cf0475c 100644 --- a/examples/smoke-co-alarm-app/silabs/BUILD.gn +++ b/examples/smoke-co-alarm-app/silabs/BUILD.gn @@ -49,6 +49,21 @@ declare_args() { chip_print_memory_usage = false } +if (slc_generate) { + # Generate Project Specific config (Board, hardware used etc..) + print(exec_script("${chip_root}/third_party/silabs/slc_gen/run_slc.py", + [ + rebase_path(chip_root), + "${silabs_board}", + "${disable_lcd}", + "${use_wstk_buttons}", + "${use_wstk_leds}", + "${use_external_flash}", + "${silabs_mcu}", + ], + "list lines")) +} + if (wifi_soc) { siwx917_sdk("sdk") { sources = [ @@ -115,6 +130,10 @@ silabs_executable("smoke_co_alarm_app") { include_dirs = [ "include" ] defines = [] + if (silabs_board == "BRD2704A") { + defines += [ "SL_STATUS_LED=0" ] + } + sources = [ "${examples_common_plat_dir}/main.cpp", "src/AppTask.cpp", @@ -122,10 +141,6 @@ silabs_executable("smoke_co_alarm_app") { "src/ZclCallbacks.cpp", ] - if (chip_build_libshell) { - sources += [ "src/EventHandlerLibShell.cpp" ] - } - deps = [ ":sdk", app_data_model, diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md index 88ec2711989229..2aec36eb0cb6c9 100644 --- a/examples/smoke-co-alarm-app/silabs/README.md +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -379,3 +379,13 @@ features can easily be toggled on or off. Here is a short list of options : $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A kvs_max_entries=50 ``` + +### Enabling test event trigger + +`silabs_test_event_trigger_enabled, silabs_test_event_trigger_enable_key` + + ``` + The value of silabs_test_event_trigger_enable_key is specific to each device manufacturer + + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A silabs_test_event_trigger_enabled=true silabs_test_event_trigger_enable_key=\"00112233445566778899aabbccddeeff\" + ``` diff --git a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h index d8047f6ea600b6..be1b38a8bb5e3a 100644 --- a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h +++ b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h @@ -31,18 +31,90 @@ class SmokeCoAlarmManager { public: + using ExpressedStateEnum = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; + + enum TriggeredEvent_t + { + kTriggeredEvent_WarningSmokeAlarm = 0xffffffff00000090, + kTriggeredEvent_CriticalSmokeAlarm = 0xffffffff0000009c, + kTriggeredEvent_SmokeAlarmClear = 0xffffffff000000a0, + kTriggeredEvent_WarningCOAlarm = 0xffffffff00000091, + kTriggeredEvent_CriticalCOAlarm = 0xffffffff0000009d, + kTriggeredEvent_COAlarmClear = 0xffffffff000000a1, + kTriggeredEvent_WarningBatteryAlert = 0xffffffff00000095, + kTriggeredEvent_CriticalBatteryAlert = 0xffffffff0000009e, + kTriggeredEvent_BatteryAlertClear = 0xffffffff000000a5, + kTriggeredEvent_HardwareFaultAlert = 0xffffffff00000093, + kTriggeredEvent_HardwareFaultAlertClear = 0xffffffff000000a3, + kTriggeredEvent_EndofServiceAlert = 0xffffffff0000009a, + kTriggeredEvent_EndofServiceAlertClear = 0xffffffff000000aa, + kTriggeredEvent_DeviceMute = 0xffffffff0000009b, + kTriggeredEvent_DeviceMuteClear = 0xffffffff000000ab, + kTriggeredEvent_InterconnectSmokeAlarm = 0xffffffff00000092, + kTriggeredEvent_InterconnectSmokeAlarmClear = 0xffffffff000000a2, + kTriggeredEvent_InterconnectCOAlarm = 0xffffffff00000094, + kTriggeredEvent_InterconnectCOAlarmClear = 0xffffffff000000a4, + kTriggeredEvent_ContaminationStateHigh = 0xffffffff00000096, + kTriggeredEvent_ContaminationStateLow = 0xffffffff00000097, + kTriggeredEvent_ContaminationStateClear = 0xffffffff000000a6, + kTriggeredEvent_SensitivityLevelHigh = 0xffffffff00000098, + kTriggeredEvent_SensitivityLevelLow = 0xffffffff00000099, + kTriggeredEvent_SensitivityLevelClear = 0xffffffff000000a8, + } TriggeredEvent; + CHIP_ERROR Init(); /** * @brief Execute the self-test process and attribute changes * */ - bool StartSelfTesting(); + bool OnSelfTesting(); + + /** + * @brief Execute the self-test process manually + * + */ + bool ManualSelfTesting(); + + /** + * @brief Execute the HandleEventTrigger process + * + */ + bool OnEventTriggerHandle(uint64_t eventTrigger); + + /** + * @brief Updates the expressed state with new value + * + * @param endpointId ID of the endpoint + * @param expressedState expressed state + * @param isSet true on set, false on unset + * @return true on success, false on failure + */ + bool SetExpressedState(chip::EndpointId endpointId, ExpressedStateEnum expressedState, bool isSet); private: friend SmokeCoAlarmManager & AlarmMgr(void); - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum mExpressedState; + /** + * @brief Record expressed state in decreasing priority + * + */ + std::array mExpressedStatePriority; + + /** + * @brief Expression status record values + * + */ + int mExpressedStateMask = 1; + + bool mEndSelfTesting; + + void CancelTimer(void); + void StartTimer(uint32_t aTimeoutMs); + + static void TimerEventHandler(TimerHandle_t xTimer); + static void SelfTestingEventHandler(AppEvent * aEvent); + static void EndSelfTestingEventHandler(AppEvent * aEvent); static SmokeCoAlarmManager sAlarm; }; diff --git a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp index 21873ea7488c2c..4e2341e3b7ef45 100644 --- a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp @@ -21,7 +21,6 @@ #include "LEDWidget.h" -#include #include #include #include @@ -38,7 +37,7 @@ #include -#if defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(BRD4325B)) #define LIGHT_LED 1 #else #define LIGHT_LED 0 @@ -141,7 +140,11 @@ void AppTask::AppTaskMain(void * pvParameter) void AppTask::ButtonActionEventHandler(AppEvent * aEvent) { - SILABS_LOG("Button pressed!"); + bool success = AlarmMgr().ManualSelfTesting(); + if (!success) + { + SILABS_LOG("Manual self-test failed"); + } } void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) diff --git a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp index 8b1b3544ef75af..77919b896d5126 100644 --- a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp @@ -29,32 +29,336 @@ using namespace ::chip::DeviceLayer; SmokeCoAlarmManager SmokeCoAlarmManager::sAlarm; +TimerHandle_t sAlarmTimer; + CHIP_ERROR SmokeCoAlarmManager::Init() { - ExpressedStateEnum currentExpressedState = ExpressedStateEnum::kNormal; - // read current ExpressedState on endpoint one + mExpressedStatePriority = { + ExpressedStateEnum::kTesting, ExpressedStateEnum::kEndOfService, ExpressedStateEnum::kSmokeAlarm, + ExpressedStateEnum::kCOAlarm, ExpressedStateEnum::kInterconnectSmoke, ExpressedStateEnum::kInterconnectCO, + ExpressedStateEnum::kHardwareFault, ExpressedStateEnum::kBatteryAlert, ExpressedStateEnum::kNormal + }; + + // Create FreeRTOS sw timer for alarm timer. + sAlarmTimer = xTimerCreate("alarmTmr", // Just a text name, not used by the RTOS kernel + pdMS_TO_TICKS(1), // == default timer period + false, // no timer reload (==one-shot) + (void *) this, // init timer id = alarm obj context + TimerEventHandler // timer callback handler + ); + + if (sAlarmTimer == NULL) + { + SILABS_LOG("sAlarmTimer timer create failed"); + return APP_ERROR_CREATE_TIMER_FAILED; + } + + // read current State on endpoint one chip::DeviceLayer::PlatformMgr().LockChipStack(); - SmokeCoAlarmServer::Instance().GetExpressedState(1, currentExpressedState); + ExpressedStateEnum currentExpressedState; + bool success = SmokeCoAlarmServer::Instance().GetExpressedState(1, currentExpressedState); + if (success) + { + mExpressedStateMask |= (1 << to_underlying(currentExpressedState)); + } + + AlarmStateEnum currentSmokeState; + success = SmokeCoAlarmServer::Instance().GetSmokeState(1, currentSmokeState); + if (success && (currentSmokeState != AlarmStateEnum::kNormal)) + { + mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kSmokeAlarm)); + } + + AlarmStateEnum currentCOState; + success = SmokeCoAlarmServer::Instance().GetCOState(1, currentCOState); + if (success && (currentCOState != AlarmStateEnum::kNormal)) + { + mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kCOAlarm)); + } + + AlarmStateEnum currentBatteryAlert; + success = SmokeCoAlarmServer::Instance().GetBatteryAlert(1, currentBatteryAlert); + if (success && (currentBatteryAlert != AlarmStateEnum::kNormal)) + { + mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kBatteryAlert)); + } + + bool currentHardwareFaultAlert; + success = SmokeCoAlarmServer::Instance().GetHardwareFaultAlert(1, currentHardwareFaultAlert); + if (success && (currentHardwareFaultAlert != false)) + { + mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kHardwareFault)); + } + + EndOfServiceEnum currentEndOfServiceAlert; + success = SmokeCoAlarmServer::Instance().GetEndOfServiceAlert(1, currentEndOfServiceAlert); + if (success && (currentEndOfServiceAlert != EndOfServiceEnum::kNormal)) + { + mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kEndOfService)); + } chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - mExpressedState = currentExpressedState; + mEndSelfTesting = false; return CHIP_NO_ERROR; } -bool SmokeCoAlarmManager::StartSelfTesting() +void SmokeCoAlarmManager::StartTimer(uint32_t aTimeoutMs) +{ + if (xTimerIsTimerActive(sAlarmTimer)) + { + SILABS_LOG("app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ms if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sAlarmTimer, pdMS_TO_TICKS(aTimeoutMs), pdMS_TO_TICKS(100)) != pdPASS) + { + SILABS_LOG("sAlarmTimer timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void SmokeCoAlarmManager::CancelTimer(void) +{ + if (xTimerStop(sAlarmTimer, pdMS_TO_TICKS(0)) == pdFAIL) + { + SILABS_LOG("sAlarmTimer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } +} + +void SmokeCoAlarmManager::TimerEventHandler(TimerHandle_t xTimer) +{ + // Get alarm obj context from timer id. + SmokeCoAlarmManager * alarm = static_cast(pvTimerGetTimerID(xTimer)); + + // The timer event handler will be called in the context of the timer task + // once sAlarmTimer expires. Post an event to apptask queue with the actual handler + // so that the event can be handled in the context of the apptask. + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = alarm; + if (alarm->mEndSelfTesting) + { + event.Handler = EndSelfTestingEventHandler; + } + AppTask::GetAppTask().PostEvent(&event); +} + +void SmokeCoAlarmManager::SelfTestingEventHandler(AppEvent * aEvent) { + chip::DeviceLayer::PlatformMgr().LockChipStack(); bool success = SmokeCoAlarmServer::Instance().SetTestInProgress(1, true); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - if (success) + if (!success) { - SILABS_LOG("Start self-testing!"); + SILABS_LOG("Start self-testing failed"); + return; + } + + SILABS_LOG("Start self-testing!"); + + AlarmMgr().mEndSelfTesting = true; + AlarmMgr().StartTimer(10000); // Self-test simulation in progress +} + +void SmokeCoAlarmManager::EndSelfTestingEventHandler(AppEvent * aEvent) +{ + AlarmMgr().mEndSelfTesting = false; + chip::DeviceLayer::PlatformMgr().LockChipStack(); + bool success = SmokeCoAlarmServer::Instance().SetTestInProgress(1, false); + if (success) + { + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kTesting, false); SILABS_LOG("End self-testing!"); } + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); +} + +bool SmokeCoAlarmManager::OnSelfTesting() +{ + AppEvent event; + event.Handler = SelfTestingEventHandler; + AppTask::GetAppTask().PostEvent(&event); + + return true; +} + +bool SmokeCoAlarmManager::ManualSelfTesting() +{ + bool success = false; + + if ((mExpressedStateMask & 0b110010110) == 0) + { + chip::DeviceLayer::PlatformMgr().LockChipStack(); + success = AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kTesting, true); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + + if (success) + { + success = OnSelfTesting(); + } + } + + return success; +} + +bool SmokeCoAlarmManager::OnEventTriggerHandle(uint64_t eventTrigger) +{ + bool isValidCommand = true; + + switch (eventTrigger) + { + case kTriggeredEvent_WarningSmokeAlarm: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kWarning), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, true); + break; + + case kTriggeredEvent_CriticalSmokeAlarm: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kCritical), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, true); + break; + + case kTriggeredEvent_SmokeAlarmClear: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kNormal), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, false); + break; + + case kTriggeredEvent_WarningCOAlarm: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kWarning), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, true); + break; + + case kTriggeredEvent_CriticalCOAlarm: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kCritical), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, true); + break; + + case kTriggeredEvent_COAlarmClear: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kNormal), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, false); + break; + + case kTriggeredEvent_WarningBatteryAlert: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kWarning), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, true); + break; + + case kTriggeredEvent_CriticalBatteryAlert: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kCritical), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, true); + break; + + case kTriggeredEvent_BatteryAlertClear: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kNormal), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, false); + break; + + case kTriggeredEvent_HardwareFaultAlert: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, true), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kHardwareFault, true); + break; + + case kTriggeredEvent_HardwareFaultAlertClear: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, false), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kHardwareFault, false); + break; - SmokeCoAlarmServer::Instance().SetExpressedState(1, mExpressedState); - SmokeCoAlarmServer::Instance().SetTestInProgress(1, false); + case kTriggeredEvent_EndofServiceAlert: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kExpired), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kEndOfService, true); + break; + + case kTriggeredEvent_EndofServiceAlertClear: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kNormal), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kEndOfService, false); + break; + + case kTriggeredEvent_DeviceMute: + SmokeCoAlarmServer::Instance().SetDeviceMuted(1, MuteStateEnum::kMuted); + break; + + case kTriggeredEvent_DeviceMuteClear: + SmokeCoAlarmServer::Instance().SetDeviceMuted(1, MuteStateEnum::kNotMuted); + break; + + case kTriggeredEvent_InterconnectSmokeAlarm: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kWarning), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectSmoke, true); + break; + + case kTriggeredEvent_InterconnectSmokeAlarmClear: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kNormal), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectSmoke, false); + break; + + case kTriggeredEvent_InterconnectCOAlarm: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kWarning), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectCO, true); + break; + + case kTriggeredEvent_InterconnectCOAlarmClear: + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kNormal), true); + AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectCO, false); + break; + + case kTriggeredEvent_ContaminationStateHigh: + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kWarning); + break; + + case kTriggeredEvent_ContaminationStateLow: + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kLow); + break; + + case kTriggeredEvent_ContaminationStateClear: + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kNormal); + break; + + case kTriggeredEvent_SensitivityLevelHigh: + SmokeCoAlarmServer::Instance().SetSensitivityLevel(1, SensitivityEnum::kHigh); + break; + + case kTriggeredEvent_SensitivityLevelLow: + SmokeCoAlarmServer::Instance().SetSensitivityLevel(1, SensitivityEnum::kLow); + break; + + case kTriggeredEvent_SensitivityLevelClear: + SmokeCoAlarmServer::Instance().SetSensitivityLevel(1, SensitivityEnum::kStandard); + break; + + default: + isValidCommand = false; + } + + return isValidCommand; +} + +bool SmokeCoAlarmManager::SetExpressedState(EndpointId endpointId, ExpressedStateEnum expressedState, bool isSet) +{ + bool success = false; + + if (isSet) + { + mExpressedStateMask |= (1 << to_underlying(expressedState)); + } + else + { + mExpressedStateMask &= ~(1 << to_underlying(expressedState)); + } + + for (auto it : mExpressedStatePriority) + { + if (mExpressedStateMask & (1 << to_underlying(it))) + { + success = SmokeCoAlarmServer::Instance().SetExpressedState(endpointId, it); + break; + } + } return success; } diff --git a/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp b/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp index 28c84a6b206e8d..49050b80d6675c 100644 --- a/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp @@ -23,6 +23,7 @@ #include "AppConfig.h" #include "SmokeCoAlarmManager.h" +#include "SilabsTestEventTriggerDelegate.h" #include #include #include @@ -63,5 +64,10 @@ void emberAfSmokeCoAlarmClusterInitCallback(EndpointId endpoint) bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) { - return AlarmMgr().StartSelfTesting(); + return AlarmMgr().OnSelfTesting(); +} + +bool emberAfHandleEventTrigger(uint64_t eventTrigger) +{ + return AlarmMgr().OnEventTriggerHandle(eventTrigger); } diff --git a/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni b/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni index 8312252d1a56c9..d06a784404a350 100644 --- a/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni +++ b/examples/smoke-co-alarm-app/silabs/with_pw_rpc.gni @@ -25,10 +25,5 @@ app_data_model = "${chip_root}/examples/smoke-co-alarm-app/smoke-co-alarm-common" chip_enable_pw_rpc = true chip_enable_openthread = true -chip_openthread_ftd = true cpp_standard = "gnu++17" - -# To fit in flash -chip_detail_logging = false -show_qr_code = false diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index ee119bf83f9813..f48b0979eff509 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -79,6 +79,75 @@ server cluster Identify = 3 { command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { struct DeviceTypeStruct { @@ -460,17 +529,6 @@ server cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ -server cluster PowerSourceConfiguration = 46 { - readonly attribute INT8U sources[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -691,11 +749,9 @@ server cluster PowerSource = 47 { readonly attribute PowerSourceStatusEnum status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; - readonly attribute nullable int32u wiredAssessedCurrent = 6; readonly attribute BatChargeLevelEnum batChargeLevel = 14; readonly attribute boolean batReplacementNeeded = 15; readonly attribute BatReplaceabilityEnum batReplaceability = 16; - readonly attribute char_string<60> batReplacementDescription = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1247,119 +1303,6 @@ server cluster ThreadNetworkDiagnostics = 53 { command ResetCounts(): DefaultSuccess = 0; } -/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCauseEnum : ENUM8 { - kUnknown = 0; - kAssociationFailed = 1; - kAuthenticationFailed = 2; - kSsidNotFound = 3; - } - - enum ConnectionStatusEnum : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum SecurityTypeEnum : ENUM8 { - kUnspecified = 0; - kNone = 1; - kWEP = 2; - kWPA = 3; - kWPA2 = 4; - kWPA3 = 5; - } - - enum WiFiVersionEnum : ENUM8 { - kA = 0; - kB = 1; - kG = 2; - kN = 3; - kAc = 4; - kAx = 5; - kAh = 6; - } - - bitmap Feature : BITMAP32 { - kPacketCounts = 0x1; - kErrorCounts = 0x2; - } - - info event Disconnection = 0 { - INT16U reasonCode = 0; - } - - info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; - INT16U status = 1; - } - - info event ConnectionStatus = 2 { - ConnectionStatusEnum connectionStatus = 0; - } - - readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityTypeEnum securityType = 1; - readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; - readonly attribute nullable int16u channelNumber = 3; - readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - command ResetCounts(): DefaultSuccess = 0; -} - -/** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { - enum PHYRateEnum : ENUM8 { - kRate10M = 0; - kRate100M = 1; - kRate1G = 2; - kRate25G = 3; - kRate5G = 4; - kRate10G = 5; - kRate40G = 6; - kRate100G = 7; - kRate200G = 8; - kRate400G = 9; - } - - bitmap Feature : BITMAP32 { - kPacketCounts = 0x1; - kErrorCounts = 0x2; - } - - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - command ResetCounts(): DefaultSuccess = 0; -} - /** Commands to trigger a Node to allow a new Administrator to commission it. */ server cluster AdministratorCommissioning = 60 { enum CommissioningWindowStatusEnum : ENUM8 { @@ -1618,6 +1561,53 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +server cluster IcdManagement = 70 { + bitmap Feature : BITMAP32 { + kCheckInProtocolSupport = 0x1; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive octet_string<16> key = 3; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeInterval = 0; + readonly attribute int32u activeModeInterval = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) int32u ICDCounter = 4; + readonly attribute int16u clientsSupportedPerFabric = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RegisterClientRequest { + node_id checkInNodeID = 0; + INT64U monitoredSubject = 1; + OCTET_STRING<16> key = 2; + optional OCTET_STRING<16> verificationKey = 3; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional OCTET_STRING<16> key = 1; + } + + response struct RegisterClientResponse = 1 { + INT32U ICDCounter = 0; + } + + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + command access(invoke: manage) StayActiveRequest(): DefaultSuccess = 3; +} + /** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ server cluster SmokeCoAlarm = 92 { enum AlarmStateEnum : ENUM8 { @@ -1666,13 +1656,16 @@ server cluster SmokeCoAlarm = 92 { kCOAlarm = 0x2; } - info event SmokeAlarm = 0 { + critical event SmokeAlarm = 0 { + AlarmStateEnum alarmSeverityLevel = 0; } - info event COAlarm = 1 { + critical event COAlarm = 1 { + AlarmStateEnum alarmSeverityLevel = 0; } info event LowBattery = 2 { + AlarmStateEnum alarmSeverityLevel = 0; } info event HardwareFault = 3 { @@ -1690,10 +1683,12 @@ server cluster SmokeCoAlarm = 92 { info event MuteEnded = 7 { } - info event InterconnectSmokeAlarm = 8 { + critical event InterconnectSmokeAlarm = 8 { + AlarmStateEnum alarmSeverityLevel = 0; } - info event InterconnectCOAlarm = 9 { + critical event InterconnectCOAlarm = 9 { + AlarmStateEnum alarmSeverityLevel = 0; } info event AllClear = 10 { @@ -1711,6 +1706,7 @@ server cluster SmokeCoAlarm = 92 { readonly attribute AlarmStateEnum interconnectCOAlarm = 9; readonly attribute ContaminationStateEnum contaminationState = 10; attribute SensitivityEnum sensitivityLevel = 11; + readonly attribute epoch_s expiryDate = 12; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1721,6 +1717,223 @@ server cluster SmokeCoAlarm = 92 { command SelfTestRequest(): DefaultSuccess = 0; } +/** The Test Cluster is meant to validate the generated code */ +server cluster UnitTesting = 4294048773 { + enum SimpleEnum : ENUM8 { + kUnspecified = 0; + kValueA = 1; + kValueB = 2; + kValueC = 3; + } + + bitmap Bitmap16MaskMap : BITMAP16 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x4000; + } + + bitmap Bitmap32MaskMap : BITMAP32 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x40000000; + } + + bitmap Bitmap64MaskMap : BITMAP64 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x4000000000000000; + } + + bitmap Bitmap8MaskMap : BITMAP8 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x40; + } + + bitmap SimpleBitmap : BITMAP8 { + kValueA = 0x1; + kValueB = 0x2; + kValueC = 0x4; + } + + struct SimpleStruct { + int8u a = 0; + boolean b = 1; + SimpleEnum c = 2; + octet_string d = 3; + char_string e = 4; + SimpleBitmap f = 5; + single g = 6; + double h = 7; + } + + fabric_scoped struct TestFabricScoped { + fabric_sensitive int8u fabricSensitiveInt8u = 1; + optional fabric_sensitive int8u optionalFabricSensitiveInt8u = 2; + nullable fabric_sensitive int8u nullableFabricSensitiveInt8u = 3; + optional nullable fabric_sensitive int8u nullableOptionalFabricSensitiveInt8u = 4; + fabric_sensitive char_string fabricSensitiveCharString = 5; + fabric_sensitive SimpleStruct fabricSensitiveStruct = 6; + fabric_sensitive int8u fabricSensitiveInt8uList[] = 7; + fabric_idx fabricIndex = 254; + } + + struct NullablesAndOptionalsStruct { + nullable int16u nullableInt = 0; + optional int16u optionalInt = 1; + optional nullable int16u nullableOptionalInt = 2; + nullable char_string nullableString = 3; + optional char_string optionalString = 4; + optional nullable char_string nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; + } + + struct NestedStruct { + int8u a = 0; + boolean b = 1; + SimpleStruct c = 2; + } + + struct NestedStructList { + int8u a = 0; + boolean b = 1; + SimpleStruct c = 2; + SimpleStruct d[] = 3; + int32u e[] = 4; + octet_string f[] = 5; + int8u g[] = 6; + } + + struct DoubleNestedStructList { + NestedStructList a[] = 0; + } + + struct TestListStructOctet { + int64u member1 = 0; + octet_string<32> member2 = 1; + } + + info event TestEvent = 1 { + INT8U arg1 = 1; + SimpleEnum arg2 = 2; + BOOLEAN arg3 = 3; + SimpleStruct arg4 = 4; + SimpleStruct arg5[] = 5; + SimpleEnum arg6[] = 6; + } + + fabric_sensitive info event TestFabricScopedEvent = 2 { + fabric_idx fabricIndex = 254; + } + + attribute boolean boolean = 0; + attribute Bitmap8MaskMap bitmap8 = 1; + attribute Bitmap16MaskMap bitmap16 = 2; + attribute Bitmap32MaskMap bitmap32 = 3; + attribute Bitmap64MaskMap bitmap64 = 4; + attribute int8u int8u = 5; + attribute int16u int16u = 6; + attribute int24u int24u = 7; + attribute int32u int32u = 8; + attribute int40u int40u = 9; + attribute int48u int48u = 10; + attribute int56u int56u = 11; + attribute int64u int64u = 12; + attribute int8s int8s = 13; + attribute int16s int16s = 14; + attribute int24s int24s = 15; + attribute int32s int32s = 16; + attribute int40s int40s = 17; + attribute int48s int48s = 18; + attribute int56s int56s = 19; + attribute int64s int64s = 20; + attribute enum8 enum8 = 21; + attribute enum16 enum16 = 22; + attribute single floatSingle = 23; + attribute double floatDouble = 24; + attribute octet_string<10> octetString = 25; + attribute INT8U listInt8u[] = 26; + attribute OCTET_STRING listOctetString[] = 27; + attribute TestListStructOctet listStructOctetString[] = 28; + attribute long_octet_string<1000> longOctetString = 29; + attribute char_string<10> charString = 30; + attribute long_char_string<1000> longCharString = 31; + attribute epoch_us epochUs = 32; + attribute epoch_s epochS = 33; + attribute vendor_id vendorId = 34; + attribute NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute SimpleEnum enumAttr = 36; + attribute SimpleStruct structAttr = 37; + attribute int8u rangeRestrictedInt8u = 38; + attribute int8s rangeRestrictedInt8s = 39; + attribute int16u rangeRestrictedInt16u = 40; + attribute int16s rangeRestrictedInt16s = 41; + attribute LONG_OCTET_STRING listLongOctetString[] = 42; + attribute TestFabricScoped listFabricScoped[] = 43; + timedwrite attribute boolean timedWriteBoolean = 48; + attribute boolean generalErrorBoolean = 49; + attribute boolean clusterErrorBoolean = 50; + attribute nullable boolean nullableBoolean = 16384; + attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; + attribute nullable Bitmap16MaskMap nullableBitmap16 = 16386; + attribute nullable Bitmap32MaskMap nullableBitmap32 = 16387; + attribute nullable Bitmap64MaskMap nullableBitmap64 = 16388; + attribute nullable int8u nullableInt8u = 16389; + attribute nullable int16u nullableInt16u = 16390; + attribute nullable int24u nullableInt24u = 16391; + attribute nullable int32u nullableInt32u = 16392; + attribute nullable int40u nullableInt40u = 16393; + attribute nullable int48u nullableInt48u = 16394; + attribute nullable int56u nullableInt56u = 16395; + attribute nullable int64u nullableInt64u = 16396; + attribute nullable int8s nullableInt8s = 16397; + attribute nullable int16s nullableInt16s = 16398; + attribute nullable int24s nullableInt24s = 16399; + attribute nullable int32s nullableInt32s = 16400; + attribute nullable int40s nullableInt40s = 16401; + attribute nullable int48s nullableInt48s = 16402; + attribute nullable int56s nullableInt56s = 16403; + attribute nullable int64s nullableInt64s = 16404; + attribute nullable enum8 nullableEnum8 = 16405; + attribute nullable enum16 nullableEnum16 = 16406; + attribute nullable single nullableFloatSingle = 16407; + attribute nullable double nullableFloatDouble = 16408; + attribute nullable octet_string<10> nullableOctetString = 16409; + attribute nullable char_string<10> nullableCharString = 16414; + attribute nullable SimpleEnum nullableEnumAttr = 16420; + attribute nullable SimpleStruct nullableStruct = 16421; + attribute nullable int8u nullableRangeRestrictedInt8u = 16422; + attribute nullable int8s nullableRangeRestrictedInt8s = 16423; + attribute nullable int16u nullableRangeRestrictedInt16u = 16424; + attribute nullable int16s nullableRangeRestrictedInt16s = 16425; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEmitTestEventRequestRequest { + INT8U arg1 = 0; + SimpleEnum arg2 = 1; + BOOLEAN arg3 = 2; + } + + command Test(): DefaultSuccess = 0; + command TestNotHandled(): DefaultSuccess = 1; + command TestSpecific(): TestSpecificResponse = 2; + command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; +} + endpoint 0 { device type rootdevice = 22, version 1; binding cluster OtaSoftwareUpdateProvider; @@ -1735,8 +1948,6 @@ endpoint 0 { } server cluster AccessControl { - emits event AccessControlEntryChanged; - emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; callback attribute subjectsPerAccessControlEntry default = 4; @@ -1748,9 +1959,6 @@ endpoint 0 { } server cluster BasicInformation { - emits event StartUp; - emits event ShutDown; - emits event Leave; callback attribute dataModelRevision default = 10; callback attribute vendorName; callback attribute vendorID; @@ -1775,9 +1983,6 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - emits event StateTransition; - emits event VersionApplied; - emits event DownloadError; callback attribute defaultOTAProviders default = 0; ram attribute updatePossible default = 1; ram attribute updateState default = 0; @@ -1801,22 +2006,6 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster PowerSourceConfiguration { - callback attribute sources; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster PowerSource { - emits event WiredFaultChange; - ram attribute status default = 1; - ram attribute order default = 0; - ram attribute description default = "USB"; - ram attribute wiredAssessedCurrent; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -1846,10 +2035,6 @@ endpoint 0 { } server cluster GeneralDiagnostics { - emits event HardwareFaultChange; - emits event RadioFaultChange; - emits event NetworkFaultChange; - emits event BootReason; callback attribute networkInterfaces; callback attribute rebootCount default = 0x0000; callback attribute upTime default = 0x0000000000000000; @@ -1940,41 +2125,6 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster WiFiNetworkDiagnostics { - emits event Disconnection; - emits event AssociationFailure; - emits event ConnectionStatus; - callback attribute bssid; - callback attribute securityType; - callback attribute wiFiVersion; - callback attribute channelNumber default = 0x0000; - callback attribute rssi default = 0x00; - callback attribute beaconLostCount default = 0x00000000; - callback attribute beaconRxCount default = 0x00000000; - callback attribute packetMulticastRxCount default = 0x00000000; - callback attribute packetMulticastTxCount default = 0x00000000; - callback attribute packetUnicastRxCount default = 0x00000000; - callback attribute packetUnicastTxCount default = 0x00000000; - callback attribute currentMaxRate default = 0x0000000000000000; - callback attribute overrunCount default = 0x0000000000000000; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster EthernetNetworkDiagnostics { - callback attribute PHYRate; - callback attribute fullDuplex default = 0x00; - callback attribute packetRxCount default = 0x0000000000000000; - callback attribute packetTxCount default = 0x0000000000000000; - callback attribute txErrCount default = 0x0000000000000000; - callback attribute collisionCount default = 0x0000000000000000; - callback attribute overrunCount default = 0x0000000000000000; - callback attribute carrierDetect default = 0x00; - callback attribute timeSinceReset default = 0x0000000000000000; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - server cluster AdministratorCommissioning { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; @@ -1998,7 +2148,7 @@ endpoint 0 { callback attribute groupKeyMap; callback attribute groupTable; callback attribute maxGroupsPerFabric; - callback attribute maxGroupKeysPerFabric default = 1; + callback attribute maxGroupKeysPerFabric; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2014,29 +2164,47 @@ endpoint 0 { ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } -} -endpoint 1 { - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x0; + server cluster IcdManagement { + ram attribute idleModeInterval default = 500; + ram attribute activeModeInterval default = 300; + ram attribute activeModeThreshold default = 300; + callback attribute registeredClients; + ram attribute ICDCounter; + ram attribute clientsSupportedPerFabric default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 118, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Groups { + ram attribute nameSupport; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster PowerSource { - ram attribute status default = 1; - ram attribute order default = 1; - ram attribute description default = "Battery"; - ram attribute batChargeLevel; + emits event BatFaultChange; + ram attribute status default = 0; + ram attribute order default = 2; + ram attribute description default = "B2"; + ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; ram attribute batReplaceability; - ram attribute batReplacementDescription; - ram attribute featureMap default = 0x0A; + ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; } @@ -2059,14 +2227,101 @@ endpoint 1 { persist attribute deviceMuted default = 0; ram attribute testInProgress default = 0; persist attribute hardwareFaultAlert default = 0; - persist attribute endOfServiceAlert default = 1; + persist attribute endOfServiceAlert default = 0; ram attribute interconnectSmokeAlarm default = 0; ram attribute interconnectCOAlarm default = 0; ram attribute contaminationState default = 0; ram attribute sensitivityLevel default = 1; + ram attribute expiryDate default = 0; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; } + + server cluster UnitTesting { + emits event TestEvent; + ram attribute boolean default = false; + ram attribute bitmap8 default = 0; + ram attribute bitmap16 default = 0; + ram attribute bitmap32 default = 0; + ram attribute bitmap64 default = 0; + ram attribute int8u default = 0; + ram attribute int16u default = 0; + ram attribute int24u default = 0; + ram attribute int32u default = 0; + ram attribute int40u default = 0; + ram attribute int48u default = 0; + ram attribute int56u default = 0; + ram attribute int64u default = 0; + ram attribute int8s default = 0; + ram attribute int16s default = 0; + ram attribute int24s default = 0; + ram attribute int32s default = 0; + ram attribute int40s default = 0; + ram attribute int48s default = 0; + ram attribute int56s default = 0; + ram attribute int64s default = 0; + ram attribute enum8 default = 0; + ram attribute enum16 default = 0; + ram attribute floatSingle default = 0; + ram attribute floatDouble default = 0; + ram attribute octetString; + callback attribute listInt8u; + callback attribute listOctetString; + callback attribute listStructOctetString; + ram attribute longOctetString; + ram attribute charString; + ram attribute longCharString; + ram attribute epochUs; + ram attribute epochS; + ram attribute vendorId default = 0; + callback attribute listNullablesAndOptionalsStruct; + ram attribute enumAttr; + callback attribute structAttr; + ram attribute rangeRestrictedInt8u default = 70; + ram attribute rangeRestrictedInt8s default = -5; + ram attribute rangeRestrictedInt16u default = 200; + ram attribute rangeRestrictedInt16s default = -5; + callback attribute listLongOctetString; + callback attribute listFabricScoped; + ram attribute timedWriteBoolean; + callback attribute generalErrorBoolean; + callback attribute clusterErrorBoolean; + ram attribute nullableBoolean default = false; + ram attribute nullableBitmap8 default = 0; + ram attribute nullableBitmap16 default = 0; + ram attribute nullableBitmap32 default = 0; + ram attribute nullableBitmap64 default = 0; + ram attribute nullableInt8u default = 0; + ram attribute nullableInt16u default = 0; + ram attribute nullableInt24u default = 0; + ram attribute nullableInt32u default = 0; + ram attribute nullableInt40u default = 0; + ram attribute nullableInt48u default = 0; + ram attribute nullableInt56u default = 0; + ram attribute nullableInt64u default = 0; + ram attribute nullableInt8s default = 0; + ram attribute nullableInt16s default = 0; + ram attribute nullableInt24s default = 0; + ram attribute nullableInt32s default = 0; + ram attribute nullableInt40s default = 0; + ram attribute nullableInt48s default = 0; + ram attribute nullableInt56s default = 0; + ram attribute nullableInt64s default = 0; + ram attribute nullableEnum8 default = 0; + ram attribute nullableEnum16 default = 0; + ram attribute nullableFloatSingle default = 0; + ram attribute nullableFloatDouble default = 0; + ram attribute nullableOctetString; + ram attribute nullableCharString; + ram attribute nullableEnumAttr; + callback attribute nullableStruct; + ram attribute nullableRangeRestrictedInt8u default = 70; + ram attribute nullableRangeRestrictedInt8s default = -5; + ram attribute nullableRangeRestrictedInt16u default = 200; + ram attribute nullableRangeRestrictedInt16s default = -5; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } } diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 30e2f14b557c08..e2c4aaa0e63082 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -250,6 +250,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -344,7 +360,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -500,7 +516,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -603,10 +619,10 @@ ] }, { - "name": "Descriptor", - "code": 29, + "name": "On/off Switch Configuration", + "code": 7, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -622,98 +638,184 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Descriptor", - "code": 29, + "name": "On/off Switch Configuration", + "code": 7, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { - "name": "DeviceTypeList", + "name": "switch type", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "enum8", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "switch actions", + "code": 16, "mfgCode": null, "side": "server", - "type": "array", + "type": "enum8", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 }, { - "name": "PartsList", + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", "code": 3, "mfgCode": null, - "side": "server", - "type": "array", + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ { - "name": "FeatureMap", - "code": 65532, + "name": "CurrentLevel", + "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -723,35 +825,53 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Access Control", - "code": 31, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "client", - "enabled": 0 + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] }, { - "name": "Access Control", - "code": 31, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "ACL", + "name": "DeviceTypeList", "code": 0, "mfgCode": null, "side": "server", @@ -767,7 +887,7 @@ "reportableChange": 0 }, { - "name": "Extension", + "name": "ServerList", "code": 1, "mfgCode": null, "side": "server", @@ -783,56 +903,108 @@ "reportableChange": 0 }, { - "name": "SubjectsPerAccessControlEntry", + "name": "ClientList", "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TargetsPerAccessControlEntry", + "name": "PartsList", "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AccessControlEntriesPerFabric", - "code": 4, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, "mfgCode": null, "side": "server", "type": "array", @@ -847,77 +1019,115 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "Extension", + "code": 1, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "SubjectsPerAccessControlEntry", + "code": 2, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ], - "events": [ + }, { - "name": "AccessControlEntryChanged", - "code": 0, + "name": "TargetsPerAccessControlEntry", + "code": 3, "mfgCode": null, "side": "server", - "included": 1 + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "AccessControlExtensionChanged", - "code": 1, + "name": "AccessControlEntriesPerFabric", + "code": 4, "mfgCode": null, "side": "server", - "included": 1 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -1282,29 +1492,6 @@ "maxInterval": 65344, "reportableChange": 0 } - ], - "events": [ - { - "name": "StartUp", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "ShutDown", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "Leave", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { @@ -1591,29 +1778,6 @@ "maxInterval": 65344, "reportableChange": 0 } - ], - "events": [ - { - "name": "StateTransition", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "VersionApplied", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "DownloadError", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { @@ -1863,233 +2027,44 @@ ] }, { - "name": "Power Source Configuration", - "code": 46, + "name": "General Commissioning", + "code": 48, "mfgCode": null, - "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "define": "GENERAL_COMMISSIONING_CLUSTER", "side": "client", - "enabled": 0 - }, - { - "name": "Power Source Configuration", - "code": 46, - "mfgCode": null, - "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + "enabled": 0, + "commands": [ { - "name": "Sources", + "name": "ArmFailSafe", "code": 0, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "FeatureMap", - "code": 65532, + "name": "SetRegulatoryConfig", + "code": 2, "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ { "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Status", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "PowerSourceStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Order", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Description", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "USB", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredAssessedCurrent", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ], - "events": [ - { - "name": "WiredFaultChange", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfig", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -2795,36 +2770,6 @@ "maxInterval": 65344, "reportableChange": 0 } - ], - "events": [ - { - "name": "HardwareFaultChange", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "RadioFaultChange", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "NetworkFaultChange", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "BootReason", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { @@ -4097,7 +4042,7 @@ "mfgCode": null, "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "BSSID", @@ -4339,29 +4284,6 @@ "maxInterval": 65344, "reportableChange": 0 } - ], - "events": [ - { - "name": "Disconnection", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "AssociationFailure", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "ConnectionStatus", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { @@ -4406,7 +4328,7 @@ "mfgCode": null, "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { "name": "PHYRate", @@ -4587,26 +4509,76 @@ ] }, { - "name": "Administrator Commissioning", - "code": 60, + "name": "Switch", + "code": 59, "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "define": "SWITCH_CLUSTER", "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", "enabled": 0, - "commands": [ + "attributes": [ { - "name": "OpenCommissioningWindow", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "OpenBasicCommissioningWindow", - "code": 1, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "source": "client", + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", "incoming": 1, "outgoing": 1 }, @@ -5118,22 +5090,6 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, "defaultValue": "", "reportable": 1, "minInterval": 1, @@ -5307,13 +5263,55 @@ ] }, { - "name": "Occupancy Sensing", - "code": 1030, + "name": "ICD Management", + "code": 70, "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", + "define": "ICD_MANAGEMENT_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "RegisterClient", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UnregisterClient", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StayActiveRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5324,191 +5322,123 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Occupancy Sensing", - "code": 1030, + "name": "ICD Management", + "code": 70, "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", + "define": "ICD_MANAGEMENT_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, + "commands": [ + { + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { - "name": "Occupancy", + "name": "IdleModeInterval", "code": 0, "mfgCode": null, "side": "server", - "type": "OccupancyBitmap", + "type": "int32u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "500", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OccupancySensorType", + "name": "ActiveModeInterval", "code": 1, "mfgCode": null, "side": "server", - "type": "OccupancySensorTypeEnum", + "type": "int32u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "300", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OccupancySensorTypeBitmap", + "name": "ActiveModeThreshold", "code": 2, "mfgCode": null, "side": "server", - "type": "OccupancySensorTypeBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "300", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - } - ] - }, - { - "name": "MA-doorlock", - "deviceTypeName": "MA-all-clusters-app", - "deviceTypeCode": 0, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 }, { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, + "name": "RegisteredClients", + "code": 3, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, + "name": "ICDCounter", + "code": 4, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "IdentifyType", - "code": 1, + "name": "ClientsSupportedPerFabric", + "code": 5, "mfgCode": null, "side": "server", - "type": "IdentifyTypeEnum", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5588,7 +5518,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5604,69 +5534,45 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] - }, + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-smokecoalarm", + "deviceTypeCode": 118, + "deviceTypeProfileId": 259, + "clusters": [ { - "name": "Groups", - "code": 4, + "name": "Identify", + "code": 3, "mfgCode": null, - "define": "GROUPS_CLUSTER", + "define": "IDENTIFY_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "AddGroup", + "name": "Identify", "code": 0, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { - "name": "ViewGroup", - "code": 1, + "name": "TriggerEffect", + "code": 64, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "outgoing": 0 } ], "attributes": [ @@ -5698,68 +5604,50 @@ "bounded": 0, "defaultValue": "4", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Groups", - "code": 4, + "name": "Identify", + "code": 3, "mfgCode": null, - "define": "GROUPS_CLUSTER", + "define": "IDENTIFY_CLUSTER", "side": "server", - "enabled": 0, - "commands": [ + "enabled": 1, + "attributes": [ { - "name": "AddGroupResponse", + "name": "IdentifyTime", "code": 0, "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ViewGroupResponse", + "name": "IdentifyType", "code": 1, "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 0, - "mfgCode": null, "side": "server", - "type": "NameSupportBitmap", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -5768,7 +5656,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5784,7 +5672,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5800,7 +5688,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5816,7 +5704,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5854,22 +5742,22 @@ "bounded": 0, "defaultValue": "4", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Scenes", - "code": 5, + "name": "Groups", + "code": 4, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "GROUPS_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "AddScene", + "name": "AddGroup", "code": 0, "mfgCode": null, "source": "client", @@ -5877,7 +5765,7 @@ "outgoing": 1 }, { - "name": "ViewScene", + "name": "ViewGroup", "code": 1, "mfgCode": null, "source": "client", @@ -5885,7 +5773,7 @@ "outgoing": 1 }, { - "name": "RemoveScene", + "name": "GetGroupMembership", "code": 2, "mfgCode": null, "source": "client", @@ -5893,7 +5781,7 @@ "outgoing": 1 }, { - "name": "RemoveAllScenes", + "name": "RemoveGroup", "code": 3, "mfgCode": null, "source": "client", @@ -5901,7 +5789,7 @@ "outgoing": 1 }, { - "name": "StoreScene", + "name": "RemoveAllGroups", "code": 4, "mfgCode": null, "source": "client", @@ -5909,20 +5797,12 @@ "outgoing": 1 }, { - "name": "RecallScene", + "name": "AddGroupIfIdentifying", "code": 5, "mfgCode": null, "source": "client", "incoming": 1, "outgoing": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 } ], "attributes": [ @@ -5954,22 +5834,22 @@ "bounded": 0, "defaultValue": "4", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Scenes", - "code": 5, + "name": "Groups", + "code": 4, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { - "name": "AddSceneResponse", + "name": "AddGroupResponse", "code": 0, "mfgCode": null, "source": "server", @@ -5977,7 +5857,7 @@ "outgoing": 1 }, { - "name": "ViewSceneResponse", + "name": "ViewGroupResponse", "code": 1, "mfgCode": null, "source": "server", @@ -5985,7 +5865,7 @@ "outgoing": 1 }, { - "name": "RemoveSceneResponse", + "name": "GetGroupMembershipResponse", "code": 2, "mfgCode": null, "source": "server", @@ -5993,372 +5873,330 @@ "outgoing": 1 }, { - "name": "RemoveAllScenesResponse", + "name": "RemoveGroupResponse", "code": 3, "mfgCode": null, "source": "server", "incoming": 1, "outgoing": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 } ], "attributes": [ { - "name": "SceneCount", + "name": "NameSupport", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "NameSupportBitmap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentScene", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentGroup", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SceneValid", - "code": 3, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NameSupport", - "code": 4, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastConfiguredBy", - "code": 5, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "node_id", - "included": 0, + "type": "bitmap32", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ { - "name": "AcceptedCommandList", - "code": 65529, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "side": "server", - "type": "array", + "side": "client", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", - "type": "array", + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "AttributeList", - "code": 65531, + "name": "Status", + "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "PowerSourceStatusEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "Order", + "code": 1, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Description", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "char_string", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "B2", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 }, { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, + "name": "WiredAssessedInputVoltage", + "code": 3, "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, + "side": "server", + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "WiredAssessedInputFrequency", + "code": 4, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "OnOff", - "code": 0, + "name": "WiredCurrentType", + "code": 5, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, + "type": "WiredCurrentTypeEnum", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "WiredAssessedCurrent", + "code": 6, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "WiredNominalVoltage", + "code": 7, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "WiredMaximumCurrent", + "code": 8, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "WiredPresent", + "code": 9, "mfgCode": null, "side": "server", - "type": "OnOffStartUpOnOff", - "included": 1, + "type": "boolean", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -6369,12 +6207,12 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "ActiveWiredFaults", + "code": 10, "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6385,13 +6223,13 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "BatVoltage", + "code": 11, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "int32u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6401,13 +6239,13 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "BatPercentRemaining", + "code": 12, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "int8u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6417,13 +6255,13 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "BatTimeRemaining", + "code": 13, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "int32u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6433,11 +6271,11 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "BatChargeLevel", + "code": 14, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6449,274 +6287,168 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatReplacementNeeded", + "code": 15, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatReplaceability", + "code": 16, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "switch type", - "code": 0, + "name": "BatPresent", + "code": 17, "mfgCode": null, "side": "server", - "type": "enum8", - "included": 1, + "type": "boolean", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "switch actions", - "code": 16, + "name": "ActiveBatFaults", + "code": 18, "mfgCode": null, "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatReplacementDescription", + "code": 19, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "char_string", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 }, { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, + "name": "BatCommonDesignation", + "code": 20, "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, + "side": "server", + "type": "BatCommonDesignationEnum", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatANSIDesignation", + "code": 21, "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, + "side": "server", + "type": "char_string", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "CurrentLevel", - "code": 0, + "name": "BatIECDesignation", + "code": 22, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, + "type": "char_string", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RemainingTime", - "code": 1, + "name": "BatApprovedChemistry", + "code": 23, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "BatApprovedChemistryEnum", "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MinLevel", - "code": 2, + "name": "BatCapacity", + "code": 24, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int32u", "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaxLevel", - "code": 3, + "name": "BatQuantity", + "code": 25, "mfgCode": null, "side": "server", "type": "int8u", @@ -6724,100 +6456,100 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFE", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentFrequency", - "code": 4, + "name": "BatChargeState", + "code": 26, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "BatChargeStateEnum", "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MinFrequency", - "code": 5, + "name": "BatTimeToFullCharge", + "code": 27, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaxFrequency", - "code": 6, + "name": "BatFunctionalWhileCharging", + "code": 28, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Options", - "code": 15, + "name": "BatChargingCurrent", + "code": 29, "mfgCode": null, "side": "server", - "type": "LevelControlOptions", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnOffTransitionTime", - "code": 16, + "name": "ActiveBatChargeFaults", + "code": 30, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnLevel", - "code": 17, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6827,93 +6559,13 @@ "reportableChange": 0 }, { - "name": "OnTransitionTime", - "code": 18, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OffTransitionTime", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DefaultMoveRate", - "code": 20, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpCurrentLevel", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6928,7 +6580,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6944,7 +6596,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6964,7 +6616,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6980,21 +6632,40 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "BatFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Descriptor", - "code": 29, + "name": "Smoke CO Alarm", + "code": 92, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "SMOKE_CO_ALARM_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "SelfTestRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "FeatureMap", @@ -7031,147 +6702,147 @@ ] }, { - "name": "Descriptor", - "code": 29, + "name": "Smoke CO Alarm", + "code": 92, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "SMOKE_CO_ALARM_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { - "name": "DeviceTypeList", + "name": "ExpressedState", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "ExpressedStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ServerList", + "name": "SmokeState", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "AlarmStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClientList", + "name": "COState", "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "AlarmStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartsList", + "name": "BatteryAlert", "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "AlarmStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "DeviceMuted", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "MuteStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "TestInProgress", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "HardwareFaultAlert", + "code": 6, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "EndOfServiceAlert", + "code": 7, "mfgCode": null, "side": "server", - "type": "array", + "type": "EndOfServiceEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "InterconnectSmokeAlarm", + "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "AlarmStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7183,37 +6854,27 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "InterconnectCOAlarm", + "code": 9, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "AlarmStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "FeatureMap", - "code": 65532, + "name": "ContaminationState", + "code": 10, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "ContaminationStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7225,11 +6886,11 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "SensitivityLevel", + "code": 11, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "SensitivityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7239,28 +6900,18 @@ "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "Binding", - "code": 0, + "name": "ExpiryDate", + "code": 12, "mfgCode": null, "side": "server", - "type": "array", + "type": "epoch_s", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7272,7 +6923,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7288,7 +6939,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7304,7 +6955,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7320,7 +6971,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7340,7 +6991,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7362,1938 +7013,81 @@ "maxInterval": 65534, "reportableChange": 0 } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "DataModelRevision", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "vendor_id", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductID", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NodeLabel", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Location", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "XX", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersion", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersionString", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersion", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersionString", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ManufacturingDate", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "20210614123456ZZ", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartNumber", - "code": 12, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "type": "long_char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductLabel", - "code": 14, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SerialNumber", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LocalConfigDisabled", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Reachable", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UniqueID", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CapabilityMinima", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "CapabilityMinimaStruct", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Status", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "PowerSourceStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Order", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Description", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "Battery", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredAssessedCurrent", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BatChargeLevel", - "code": 14, - "mfgCode": null, - "side": "server", - "type": "BatChargeLevelEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BatReplacementNeeded", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BatReplaceability", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "BatReplaceabilityEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BatReplacementDescription", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0A", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Smoke CO Alarm", - "code": 92, - "mfgCode": null, - "define": "SMOKE_CO_ALARM_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "SelfTestRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Smoke CO Alarm", - "code": 92, - "mfgCode": null, - "define": "SMOKE_CO_ALARM_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ExpressedState", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "ExpressedStateEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SmokeState", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "AlarmStateEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "COState", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "AlarmStateEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BatteryAlert", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "AlarmStateEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DeviceMuted", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "MuteStateEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "TestInProgress", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "HardwareFaultAlert", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EndOfServiceAlert", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "EndOfServiceEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InterconnectSmokeAlarm", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "AlarmStateEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InterconnectCOAlarm", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "AlarmStateEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ContaminationState", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "ContaminationStateEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SensitivityLevel", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "SensitivityEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ], - "events": [ - { - "name": "SmokeAlarm", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "COAlarm", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "LowBattery", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "HardwareFault", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "EndOfService", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "SelfTestComplete", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "AlarmMuted", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "MuteEnded", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "InterconnectSmokeAlarm", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "InterconnectCOAlarm", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "AllClear", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, - { - "name": "Door Lock", - "code": 257, - "mfgCode": null, - "define": "DOOR_LOCK_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "LockDoor", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UnlockDoor", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UnlockWithTimeout", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetWeekDaySchedule", - "code": 11, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetWeekDaySchedule", - "code": 12, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ClearWeekDaySchedule", - "code": 13, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "SetYearDaySchedule", - "code": 14, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetYearDaySchedule", - "code": 15, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ClearYearDaySchedule", - "code": 16, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "SetHolidaySchedule", - "code": 17, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetHolidaySchedule", - "code": 18, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ClearHolidaySchedule", - "code": 19, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "SetUser", - "code": 26, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetUser", - "code": 27, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ClearUser", - "code": 29, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetCredential", - "code": 34, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetCredentialStatus", - "code": 36, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ClearCredential", - "code": 38, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Door Lock", - "code": 257, - "mfgCode": null, - "define": "DOOR_LOCK_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "GetWeekDayScheduleResponse", - "code": 12, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetYearDayScheduleResponse", - "code": 15, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetHolidayScheduleResponse", - "code": 18, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetUserResponse", - "code": 28, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetCredentialResponse", - "code": 35, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetCredentialStatusResponse", - "code": 37, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "LockState", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "DlLockState", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LockType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DlLockType", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ActuatorEnabled", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DoorState", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "DoorStateEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DoorOpenEvents", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DoorClosedEvents", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OpenPeriod", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfTotalUsersSupported", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfPINUsersSupported", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfRFIDUsersSupported", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfWeekDaySchedulesSupportedPerUser", - "code": 20, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfYearDaySchedulesSupportedPerUser", - "code": 21, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfHolidaySchedulesSupported", - "code": 22, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxPINCodeLength", - "code": 23, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "8", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinPINCodeLength", - "code": 24, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxRFIDCodeLength", - "code": 25, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "20", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinRFIDCodeLength", - "code": 26, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CredentialRulesSupport", - "code": 27, - "mfgCode": null, - "side": "server", - "type": "DlCredentialRuleMask", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfCredentialsSupportedPerUser", - "code": 28, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Language", - "code": 33, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LEDSettings", - "code": 34, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AutoRelockTime", - "code": 35, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "60", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoundVolume", - "code": 36, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OperatingMode", - "code": 37, - "mfgCode": null, - "side": "server", - "type": "OperatingModeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SupportedOperatingModes", - "code": 38, - "mfgCode": null, - "side": "server", - "type": "DlSupportedOperatingModes", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFFF6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DefaultConfigurationRegister", - "code": 39, - "mfgCode": null, - "side": "server", - "type": "DlDefaultConfigurationRegister", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EnableLocalProgramming", - "code": 40, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EnableOneTouchLocking", - "code": 41, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "EnableInsideStatusLED", - "code": 42, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EnablePrivacyModeButton", - "code": 43, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LocalProgrammingFeatures", - "code": 44, - "mfgCode": null, - "side": "server", - "type": "DlLocalProgrammingFeatures", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WrongCodeEntryLimit", - "code": 48, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UserCodeTemporaryDisableTime", - "code": 49, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SendPINOverTheAir", - "code": 50, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "RequirePINforRemoteOperation", - "code": 51, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, + ], + "events": [ { - "name": "ExpiringUserTimeout", - "code": 53, + "name": "SmokeAlarm", + "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "COAlarm", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "LowBattery", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "EventList", - "code": 65530, + "name": "HardwareFault", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "AttributeList", - "code": 65531, + "name": "EndOfService", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "FeatureMap", - "code": 65532, + "name": "SelfTestComplete", + "code": 5, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xDB3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "included": 1 }, { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ], - "events": [ - { - "name": "DoorLockAlarm", - "code": 0, + "name": "AlarmMuted", + "code": 6, "mfgCode": null, "side": "server", "included": 1 }, { - "name": "DoorStateChange", - "code": 1, + "name": "MuteEnded", + "code": 7, "mfgCode": null, "side": "server", "included": 1 }, { - "name": "LockOperation", - "code": 2, + "name": "InterconnectSmokeAlarm", + "code": 8, "mfgCode": null, "side": "server", "included": 1 }, { - "name": "LockOperationError", - "code": 3, + "name": "InterconnectCOAlarm", + "code": 9, "mfgCode": null, "side": "server", "included": 1 }, { - "name": "LockUserChange", - "code": 4, + "name": "AllClear", + "code": 10, "mfgCode": null, "side": "server", "included": 1 @@ -9301,303 +7095,223 @@ ] }, { - "name": "Barrier Control", - "code": 259, + "name": "Unit Testing", + "code": 4294048773, "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", + "define": "UNIT_TESTING_CLUSTER", "side": "client", "enabled": 0, - "commands": [ - { - "name": "BarrierControlGoToPercent", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "BarrierControlStop", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Barrier Control", - "code": 259, - "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "barrier moving state", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "barrier safety status", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "commands": [ + { + "name": "Test", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "barrier capabilities", - "code": 3, + "name": "TestNotHandled", + "code": 1, "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "barrier open events", - "code": 4, + "name": "TestSpecific", + "code": 2, "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "barrier close events", - "code": 5, + "name": "TestEmitTestEventRequest", + "code": 20, "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "barrier command open events", - "code": 6, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Unit Testing", + "code": 4294048773, + "mfgCode": null, + "define": "UNIT_TESTING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "barrier command close events", - "code": 7, + "name": "boolean", + "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 0, + "type": "boolean", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "false", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "barrier open period", - "code": 8, + "name": "bitmap8", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 0, + "type": "Bitmap8MaskMap", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "barrier close period", - "code": 9, + "name": "bitmap16", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 0, + "type": "Bitmap16MaskMap", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "barrier position", - "code": 10, + "name": "bitmap32", + "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Bitmap32MaskMap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "bitmap64", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "Bitmap64MaskMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "int8u", + "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "int16u", + "code": 6, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "int24u", + "code": 7, "mfgCode": null, "side": "server", - "type": "array", + "type": "int24u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "int32u", + "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -9609,151 +7323,27 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "int40u", + "code": 9, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int40u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToHue", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveHue", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepHue", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToSaturation", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveSaturation", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepSaturation", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToHueAndSaturation", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToColor", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveColor", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepColor", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToColorTemperature", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StopMoveStep", - "code": 71, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveColorTemperature", - "code": 75, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 }, - { - "name": "StepColorTemperature", - "code": 76, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, + { + "name": "int48u", + "code": 10, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "int48u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -9765,245 +7355,235 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "int56u", + "code": 11, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int56u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "CurrentHue", - "code": 0, + "name": "int64u", + "code": 12, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int64u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, + "defaultValue": "0", + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentSaturation", - "code": 1, + "name": "int8s", + "code": 13, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int8s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, + "defaultValue": "0", + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RemainingTime", - "code": 2, + "name": "int16s", + "code": 14, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int16s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentX", - "code": 3, + "name": "int24s", + "code": 15, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int24s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x616B", - "reportable": 0, + "defaultValue": "0", + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentY", - "code": 4, + "name": "int32s", + "code": 16, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x607D", - "reportable": 0, + "defaultValue": "0", + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DriftCompensation", - "code": 5, + "name": "int40s", + "code": 17, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "int40s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CompensationText", - "code": 6, + "name": "int48s", + "code": 18, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int48s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorTemperatureMireds", - "code": 7, + "name": "int56s", + "code": 19, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int56s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00FA", - "reportable": 0, + "defaultValue": "0", + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorMode", - "code": 8, + "name": "int64s", + "code": 20, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "int64s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Options", - "code": 15, + "name": "enum8", + "code": 21, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "enum8", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NumberOfPrimaries", - "code": 16, + "name": "enum16", + "code": 22, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "enum16", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Primary1X", - "code": 17, + "name": "float_single", + "code": 23, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "single", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Primary1Y", - "code": 18, + "name": "float_double", + "code": 24, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "double", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Primary1Intensity", - "code": 19, + "name": "octet_string", + "code": 25, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "octet_string", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10015,13 +7595,13 @@ "reportableChange": 0 }, { - "name": "Primary2X", - "code": 21, + "name": "list_int8u", + "code": 26, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10031,13 +7611,13 @@ "reportableChange": 0 }, { - "name": "Primary2Y", - "code": 22, + "name": "list_octet_string", + "code": 27, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10047,13 +7627,13 @@ "reportableChange": 0 }, { - "name": "Primary2Intensity", - "code": 23, + "name": "list_struct_octet_string", + "code": 28, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10063,11 +7643,11 @@ "reportableChange": 0 }, { - "name": "Primary3X", - "code": 25, + "name": "long_octet_string", + "code": 29, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "long_octet_string", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10079,11 +7659,11 @@ "reportableChange": 0 }, { - "name": "Primary3Y", - "code": 26, + "name": "char_string", + "code": 30, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "char_string", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10095,11 +7675,11 @@ "reportableChange": 0 }, { - "name": "Primary3Intensity", - "code": 27, + "name": "long_char_string", + "code": 31, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "long_char_string", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10111,11 +7691,11 @@ "reportableChange": 0 }, { - "name": "Primary4X", + "name": "epoch_us", "code": 32, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "epoch_us", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10127,11 +7707,11 @@ "reportableChange": 0 }, { - "name": "Primary4Y", + "name": "epoch_s", "code": 33, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "epoch_s", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10143,15 +7723,31 @@ "reportableChange": 0 }, { - "name": "Primary4Intensity", + "name": "vendor_id", "code": 34, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "vendor_id", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "list_nullables_and_optionals_struct", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, "defaultValue": "", "reportable": 1, "minInterval": 1, @@ -10159,11 +7755,11 @@ "reportableChange": 0 }, { - "name": "Primary5X", + "name": "enum_attr", "code": 36, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "SimpleEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10175,13 +7771,13 @@ "reportableChange": 0 }, { - "name": "Primary5Y", + "name": "struct_attr", "code": 37, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "SimpleStruct", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10191,7 +7787,7 @@ "reportableChange": 0 }, { - "name": "Primary5Intensity", + "name": "range_restricted_int8u", "code": 38, "mfgCode": null, "side": "server", @@ -10200,14 +7796,30 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "70", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "range_restricted_int8s", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "-5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Primary6X", + "name": "range_restricted_int16u", "code": 40, "mfgCode": null, "side": "server", @@ -10216,36 +7828,52 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "200", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Primary6Y", + "name": "range_restricted_int16s", "code": 41, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int16s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "-5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Primary6Intensity", + "name": "list_long_octet_string", "code": 42, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "list_fabric_scoped", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10255,11 +7883,11 @@ "reportableChange": 0 }, { - "name": "WhitePointX", + "name": "timed_write_boolean", "code": 48, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10271,13 +7899,13 @@ "reportableChange": 0 }, { - "name": "WhitePointY", + "name": "general_error_boolean", "code": 49, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10287,12 +7915,28 @@ "reportableChange": 0 }, { - "name": "ColorPointRX", + "name": "cluster_error_boolean", "code": 50, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "unsupported", + "code": 255, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -10303,381 +7947,413 @@ "reportableChange": 0 }, { - "name": "ColorPointRY", - "code": 51, + "name": "nullable_boolean", + "code": 16384, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "false", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorPointRIntensity", - "code": 52, + "name": "nullable_bitmap8", + "code": 16385, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "Bitmap8MaskMap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorPointGX", - "code": 54, + "name": "nullable_bitmap16", + "code": 16386, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "Bitmap16MaskMap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorPointGY", - "code": 55, + "name": "nullable_bitmap32", + "code": 16387, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "Bitmap32MaskMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_bitmap64", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "Bitmap64MaskMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_int8u", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorPointGIntensity", - "code": 56, + "name": "nullable_int16u", + "code": 16390, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorPointBX", - "code": 58, + "name": "nullable_int24u", + "code": 16391, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int24u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorPointBY", - "code": 59, + "name": "nullable_int32u", + "code": 16392, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorPointBIntensity", - "code": 60, + "name": "nullable_int40u", + "code": 16393, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int40u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EnhancedCurrentHue", - "code": 16384, + "name": "nullable_int48u", + "code": 16394, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int48u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EnhancedColorMode", - "code": 16385, + "name": "nullable_int56u", + "code": 16395, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "int56u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorLoopActive", - "code": 16386, + "name": "nullable_int64u", + "code": 16396, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int64u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorLoopDirection", - "code": 16387, + "name": "nullable_int8s", + "code": 16397, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int8s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorLoopTime", - "code": 16388, + "name": "nullable_int16s", + "code": 16398, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int16s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0019", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorLoopStartEnhancedHue", - "code": 16389, + "name": "nullable_int24s", + "code": 16399, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 0, + "type": "int24s", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x2300", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorLoopStoredEnhancedHue", - "code": 16390, + "name": "nullable_int32s", + "code": 16400, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 0, + "type": "int32s", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorCapabilities", - "code": 16394, + "name": "nullable_int40s", + "code": 16401, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "int40s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorTempPhysicalMinMireds", - "code": 16395, + "name": "nullable_int48s", + "code": 16402, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int48s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ColorTempPhysicalMaxMireds", - "code": 16396, + "name": "nullable_int56s", + "code": 16403, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int56s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFEFF", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CoupleColorTempToLevelMinMireds", - "code": 16397, + "name": "nullable_int64s", + "code": 16404, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpColorTemperatureMireds", - "code": 16400, + "name": "nullable_enum8", + "code": 16405, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "enum8", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "nullable_enum16", + "code": 16406, "mfgCode": null, "side": "server", - "type": "array", + "type": "enum16", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "nullable_float_single", + "code": 16407, "mfgCode": null, "side": "server", - "type": "array", + "type": "single", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "nullable_float_double", + "code": 16408, "mfgCode": null, "side": "server", - "type": "array", + "type": "double", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "nullable_octet_string", + "code": 16409, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10687,124 +8363,104 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "nullable_char_string", + "code": 16414, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "char_string", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "nullable_enum_attr", + "code": 16420, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "SimpleEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMPERATURE_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "FeatureMap", - "code": 65532, + "name": "nullable_struct", + "code": 16421, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "SimpleStruct", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "nullable_range_restricted_int8u", + "code": 16422, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "70", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMPERATURE_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "MeasuredValue", - "code": 0, + "name": "nullable_range_restricted_int8s", + "code": 16423, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "int8s", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "-5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MinMeasuredValue", - "code": 1, + "name": "nullable_range_restricted_int16u", + "code": 16424, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "200", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaxMeasuredValue", - "code": 2, + "name": "nullable_range_restricted_int16s", + "code": 16425, "mfgCode": null, "side": "server", "type": "int16s", @@ -10812,18 +8468,18 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "-5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Tolerance", - "code": 3, + "name": "write_only_int8u", + "code": 16426, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -10840,7 +8496,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10856,7 +8512,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10872,7 +8528,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10888,7 +8544,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10930,105 +8586,14 @@ "maxInterval": 65534, "reportableChange": 0 } - ] - }, - { - "name": "Occupancy Sensing", - "code": 1030, - "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Occupancy Sensing", - "code": 1030, - "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Occupancy", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "OccupancyBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, + ], + "events": [ { - "name": "OccupancySensorType", + "name": "TestEvent", "code": 1, "mfgCode": null, "side": "server", - "type": "OccupancySensorTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OccupancySensorTypeBitmap", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "OccupancySensorTypeBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "included": 1 } ] } @@ -11046,13 +8611,13 @@ "deviceIdentifier": 22 }, { - "endpointTypeName": "MA-doorlock", + "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 0 + "deviceIdentifier": 118 } ], "log": [] diff --git a/examples/smoke-co-alarm-app/telink/.gitignore b/examples/smoke-co-alarm-app/telink/.gitignore new file mode 100644 index 00000000000000..84c048a73cc2e5 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/examples/smoke-co-alarm-app/telink/CMakeLists.txt b/examples/smoke-co-alarm-app/telink/CMakeLists.txt new file mode 100755 index 00000000000000..d6fa3994a89962 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/CMakeLists.txt @@ -0,0 +1,87 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +cmake_minimum_required(VERSION 3.13.1) + +set(BOARD tlsr9518adk80d) + +get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) +get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) +get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) + +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") + set(LOCAL_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") +else() + unset(LOCAL_DTC_OVERLAY_FILE) +endif() + +if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay") + set(GLOBAL_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay") +else() + unset(GLOBAL_DTC_OVERLAY_FILE) +endif() + +if(DTC_OVERLAY_FILE) + set(DTC_OVERLAY_FILE + "${DTC_OVERLAY_FILE} ${GLOBAL_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}" + CACHE STRING "" FORCE + ) +else() + set(DTC_OVERLAY_FILE ${GLOBAL_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}) +endif() + +set(CONF_FILE ${CHIP_ROOT}/config/telink/app/zephyr.conf prj.conf) + +# Load NCS/Zephyr build system +list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/telink/chip-module) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) + +project(chip-telink-smoke-co-alarm-example) + +include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) +include(${CHIP_ROOT}/src/app/chip_data_model.cmake) + +target_compile_options(app PRIVATE -fpermissive) + +target_include_directories(app PRIVATE + include + ${GEN_DIR}/app-common + ${GEN_DIR}/smoke-co-alarm-app + ${TELINK_COMMON}/common/include + ${TELINK_COMMON}/util/include) + +add_definitions( + "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" +) + +target_sources(app PRIVATE + src/AppTask.cpp + src/SmokeCoAlarmManager.cpp + src/ZclCallbacks.cpp + ${TELINK_COMMON}/common/src/mainCommon.cpp + ${TELINK_COMMON}/common/src/AppTaskCommon.cpp + ${TELINK_COMMON}/util/src/LEDWidget.cpp + ${TELINK_COMMON}/util/src/ButtonManager.cpp + ${TELINK_COMMON}/util/src/ThreadUtil.cpp + ${TELINK_COMMON}/util/src/PWMDevice.cpp) + +chip_configure_data_model(app + INCLUDE_SERVER + ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../smoke-co-alarm-common/smoke-co-alarm-app.zap +) + +if(CONFIG_CHIP_OTA_REQUESTOR) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/smoke-co-alarm-app/telink/README.md b/examples/smoke-co-alarm-app/telink/README.md new file mode 100755 index 00000000000000..ec8abe02158648 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/README.md @@ -0,0 +1,180 @@ +# Matter Telink Smoke CO Alarm Example Application + +You can use this example as a reference for creating your own application. + +![Telink B91 EVK](http://wiki.telink-semi.cn/wiki/assets/Hardware/B91_Generic_Starter_Kit_Hardware_Guide/connection_chart.png) + +## Build and flash + +1. Pull docker image from repository: + + ```bash + $ docker pull connectedhomeip/chip-build-telink:latest + ``` + +1. Run docker container: + + ```bash + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + ``` + + here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay + attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** + +1. Activate the build environment: + + ```bash + $ source ./scripts/activate.sh + ``` + +1. In the example dir run: + + ```bash + $ west build + ``` + +1. Flash binary: + + ``` + $ west flash --erase + ``` + +## Usage + +### UART + +To get output from device, connect UART to following pins: + +| Name | Pin | +| :--: | :---------------------------- | +| RX | PB3 (pin 17 of J34 connector) | +| TX | PB2 (pin 16 of J34 connector) | +| GND | GND | + +### Buttons + +The following buttons are available on **tlsr9518adk80d** board: + +| Name | Function | Description | +| :------- | :--------------------- | :----------------------------------------------------------------------------------------------------- | +| Button 1 | Factory reset | Perform factory reset to forget currently commissioned Thread network and back to uncommissioned state | +| Button 2 | Self test | Start self testing | +| Button 3 | NA | NA | +| Button 4 | Open commission window | The button is opening commissioning window to perform commissioning over BLE | + +### LEDs + +#### Indicate current state of Thread network + +**Red** LED indicates current state of Thread network. It is able to be in +following states: + +| State | Description | +| :-------------------------- | :--------------------------------------------------------------------------- | +| Blinks with short pulses | Device is not commissioned to Thread, Thread is disabled | +| Blinks with frequent pulses | Device is commissioned, Thread enabled. Device trying to JOIN thread network | +| Blinks with wide pulses | Device commissioned and joined to thread network as CHILD | + +#### Indicate identify of device + +**Green** LED used to identify the device. The LED starts blinking when the +Identify command of the Identify cluster is received. The command's argument can +be used to specify the the effect. It is able to be in following effects: + +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | + +### CHIP tool commands + +1. Build + [chip-tool cli](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + +2. Pair with device + + ``` + ${CHIP_TOOL_DIR}/chip-tool pairing ble-thread ${NODE_ID} hex:${DATASET} ${PIN_CODE} ${DISCRIMINATOR} + ``` + + Example: + + ``` + ./chip-tool pairing ble-thread 1234 hex:0e080000000000010000000300000f35060004001fffe0020811111111222222220708fd61f77bd3df233e051000112233445566778899aabbccddeeff030e4f70656e54687265616444656d6f010212340410445f2b5ca6f2a93a55ce570a70efeecb0c0402a0fff8 20202021 3840 + ``` + +3. Request Self-Test + + ``` + chip-tool smokecoalarm self-test-request 1 1 + ``` + +### OTA with Linux OTA Provider + +OTA feature enabled by default only for ota-requestor-app example. To enable OTA +feature for another Telink example: + +- set CONFIG_CHIP_OTA_REQUESTOR=y in corresponding "prj.conf" configuration + file. + +After build application with enabled OTA feature, use next binary files: + +- zephyr.bin - main binary to flash PCB (Use 2MB PCB). +- zephyr-ota.bin - binary for OTA Provider + +All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in +corresponding “prj.conf” configuration file. + +Usage of OTA: + +- Build the [Linux OTA Provider](../../ota-provider-app/linux) + + ``` + ./scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/ota-provider-app chip_config_network_layer_ble=false + ``` + +- Run the Linux OTA Provider with OTA image. + + ``` + ./chip-ota-provider-app -f zephyr-ota.bin + ``` + +- Provision the Linux OTA Provider using chip-tool + + ``` + ./chip-tool pairing onnetwork ${OTA_PROVIDER_NODE_ID} 20202021 + ``` + + here: + + - \${OTA_PROVIDER_NODE_ID} is the node id of Linux OTA Provider + +- Configure the ACL of the ota-provider-app to allow access + + ``` + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' ${OTA_PROVIDER_NODE_ID} 0 + ``` + + here: + + - \${OTA_PROVIDER_NODE_ID} is the node id of Linux OTA Provider + +- Use the chip-tool to announce the ota-provider-app to start the OTA process + + ``` + ./chip-tool otasoftwareupdaterequestor announce-otaprovider ${OTA_PROVIDER_NODE_ID} 0 0 0 ${DEVICE_NODE_ID} 0 + ``` + + here: + + - \${OTA_PROVIDER_NODE_ID} is the node id of Linux OTA Provider + - \${DEVICE_NODE_ID} is the node id of paired device + +Once the transfer is complete, OTA requestor sends ApplyUpdateRequest command to +OTA provider for applying the image. Device will restart on successful +application of OTA image. diff --git a/examples/smoke-co-alarm-app/telink/include/AppConfig.h b/examples/smoke-co-alarm-app/telink/include/AppConfig.h new file mode 100644 index 00000000000000..54a32f278d5672 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/include/AppConfig.h @@ -0,0 +1,27 @@ +/* + * + * Copyright (c) 2023 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 + +// ---- Smoke Co Sendor App Example Config ---- + +#define APP_USE_EXAMPLE_START_BUTTON 1 +#define APP_USE_THREAD_START_BUTTON 1 +#define APP_SET_DEVICE_INFO_PROVIDER 1 +#define APP_SET_NETWORK_COMM_ENDPOINT_SEC 0 +#define APP_USE_IDENTIFY_PWM 1 diff --git a/examples/smoke-co-alarm-app/telink/include/AppTask.h b/examples/smoke-co-alarm-app/telink/include/AppTask.h new file mode 100644 index 00000000000000..6644cbd455821b --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/include/AppTask.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2023 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 "AppTaskCommon.h" + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) + +class AppTask : public AppTaskCommon +{ +private: + friend AppTask & GetAppTask(void); + friend class AppTaskCommon; + + CHIP_ERROR Init(void); + + static void SelfTestEventHandler(AppEvent * aEvent); + static void SelfTestHandler(AppEvent * aEvent); + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} diff --git a/examples/smoke-co-alarm-app/telink/include/CHIPProjectConfig.h b/examples/smoke-co-alarm-app/telink/include/CHIPProjectConfig.h new file mode 100755 index 00000000000000..412932a59c3726 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/include/CHIPProjectConfig.h @@ -0,0 +1,39 @@ +/* + * + * Copyright (c) 2023 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 + +/** + * CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE + * + * Reduce packet buffer pool size to 8 (default 15) to reduce ram consumption + */ +#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8 diff --git a/examples/smoke-co-alarm-app/telink/include/SmokeCoAlarmManager.h b/examples/smoke-co-alarm-app/telink/include/SmokeCoAlarmManager.h new file mode 100644 index 00000000000000..fa441082743b78 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/include/SmokeCoAlarmManager.h @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include + +#include + +class SmokeCoAlarmManager +{ +public: + CHIP_ERROR Init(); + + /** + * @brief Execute the self-test process and attribute changes + * + */ + bool StartSelfTesting(); + +private: + friend SmokeCoAlarmManager & AlarmMgr(void); + + chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum mExpressedState; + + static SmokeCoAlarmManager sAlarm; +}; + +inline SmokeCoAlarmManager & AlarmMgr(void) +{ + return SmokeCoAlarmManager::sAlarm; +} diff --git a/examples/smoke-co-alarm-app/telink/prj.conf b/examples/smoke-co-alarm-app/telink/prj.conf new file mode 100755 index 00000000000000..637c9bf1d752e1 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/prj.conf @@ -0,0 +1,70 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This sample uses sample-defaults.conf to set options common for all +# samples. This file should contain only options specific for this sample +# or overrides of default values. + +# enable GPIO +CONFIG_GPIO=y + +# enable PWM +CONFIG_PWM=y + +# OpenThread configs +CONFIG_OPENTHREAD_MTD=y +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y +CONFIG_CHIP_THREAD_SSED=n + +# Default OpenThread network settings +CONFIG_OPENTHREAD_PANID=4660 +CONFIG_OPENTHREAD_CHANNEL=15 +CONFIG_OPENTHREAD_NETWORK_NAME="OpenThreadDemo" +CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" + +# Disable Matter OTA DFU +CONFIG_CHIP_OTA_REQUESTOR=n + +# CHIP configuration +CONFIG_CHIP_PROJECT_CONFIG="include/CHIPProjectConfig.h" +CONFIG_CHIP_OPENTHREAD_CONFIG="../../platform/telink/project_include/OpenThreadConfig.h" + +CONFIG_CHIP_DEVICE_VENDOR_ID=65521 +# 32774 == 0x8006 (example contact-sensor-app) +CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 +CONFIG_CHIP_DEVICE_TYPE=65535 + +CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=1 +CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING="2023" + +# Enable CHIP pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# CHIP shell +CONFIG_CHIP_LIB_SHELL=n + +# Disable factory data support. +CONFIG_CHIP_FACTORY_DATA=n +CONFIG_CHIP_FACTORY_DATA_BUILD=n +CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n +CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n + +# Enable Power Management +CONFIG_PM=y + +# Custom RF power values +CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y +CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/examples/smoke-co-alarm-app/telink/src/AppTask.cpp b/examples/smoke-co-alarm-app/telink/src/AppTask.cpp new file mode 100644 index 00000000000000..71f495fca26bf8 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/src/AppTask.cpp @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 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. + */ + +#include "AppTask.h" +#include "SmokeCoAlarmManager.h" +#include "platform/CHIPDeviceLayer.h" + +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::Init(void) +{ +#if APP_USE_EXAMPLE_START_BUTTON + SetExampleButtonCallbacks(SelfTestEventHandler); +#endif + InitCommonParts(); + + CHIP_ERROR err = AlarmMgr().Init(); + if (err != CHIP_NO_ERROR) + { + LOG_ERR("AlarmMgr::Init() failed"); + return err; + } + + err = ConnectivityMgr().SetBLEDeviceName("TelinkCOSensor"); + if (err != CHIP_NO_ERROR) + { + LOG_ERR("SetBLEDeviceName fail"); + return err; + } + + return CHIP_NO_ERROR; +} + +void AppTask::SelfTestHandler(AppEvent * aEvent) +{ + AlarmMgr().StartSelfTesting(); +} + +void AppTask::SelfTestEventHandler(AppEvent * aEvent) +{ + AppEvent event; + if (aEvent->Type == AppEvent::kEventType_Button) + { + event.ButtonEvent.Action = kButtonPushEvent; + event.Handler = SelfTestHandler; + GetAppTask().PostEvent(&event); + } +} diff --git a/examples/smoke-co-alarm-app/telink/src/SmokeCoAlarmManager.cpp b/examples/smoke-co-alarm-app/telink/src/SmokeCoAlarmManager.cpp new file mode 100644 index 00000000000000..7f7c3a678773d5 --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/src/SmokeCoAlarmManager.cpp @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "SmokeCoAlarmManager.h" +#include "AppConfig.h" +#include + +using namespace chip; +using namespace ::chip::app::Clusters::SmokeCoAlarm; +using namespace ::chip::DeviceLayer; + +LOG_MODULE_DECLARE(COsensor, CONFIG_CHIP_APP_LOG_LEVEL); + +SmokeCoAlarmManager SmokeCoAlarmManager::sAlarm; + +CHIP_ERROR SmokeCoAlarmManager::Init() +{ + mExpressedState = ExpressedStateEnum::kNormal; + + return CHIP_NO_ERROR; +} + +bool SmokeCoAlarmManager::StartSelfTesting() +{ + LOG_INF("Start self-testing!"); + bool success = SmokeCoAlarmServer::Instance().SetTestInProgress(1, true); + + if (success) + { + LOG_INF("Start self-testing success!"); + } + else + { + LOG_INF("Start self-testing fail!"); + } + + SmokeCoAlarmServer::Instance().SetExpressedState(1, mExpressedState); + SmokeCoAlarmServer::Instance().SetTestInProgress(1, false); + LOG_INF("End self-testing!"); + + return success; +} diff --git a/examples/smoke-co-alarm-app/telink/src/ZclCallbacks.cpp b/examples/smoke-co-alarm-app/telink/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..28c84a6b206e8d --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/src/ZclCallbacks.cpp @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" +#include "SmokeCoAlarmManager.h" + +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == SmokeCoAlarm::Id && attributeId == SmokeCoAlarm::Attributes::ExpressedState::Id) + { + static_assert(sizeof(SmokeCoAlarm::ExpressedStateEnum) == 1, "Wrong size"); + SmokeCoAlarm::ExpressedStateEnum expressedState = *(reinterpret_cast(value)); + ChipLogProgress(Zcl, "Smoke CO Alarm cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId), + to_underlying(expressedState)); + } +} + +/** @brief Smoke CO Alarm Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfSmokeCoAlarmClusterInitCallback(EndpointId endpoint) +{ + // TODO: implement any additional Cluster Server init actions +} + +bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) +{ + return AlarmMgr().StartSelfTesting(); +} diff --git a/examples/smoke-co-alarm-app/telink/third_party/connectedhomeip b/examples/smoke-co-alarm-app/telink/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/smoke-co-alarm-app/telink/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/temperature-measurement-app/telink/README.md b/examples/temperature-measurement-app/telink/README.md index 4b33ad843c7e84..6e2e7850735b72 100644 --- a/examples/temperature-measurement-app/telink/README.md +++ b/examples/temperature-measurement-app/telink/README.md @@ -13,13 +13,13 @@ creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/thermostat/telink/Readme.md b/examples/thermostat/telink/Readme.md index 9b097c02ad9611..bc60f34b528a71 100755 --- a/examples/thermostat/telink/Readme.md +++ b/examples/thermostat/telink/Readme.md @@ -9,13 +9,13 @@ You can use this example as a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/examples/window-app/telink/README.md b/examples/window-app/telink/README.md index d8e02132cd6bec..cc4a63d926b696 100644 --- a/examples/window-app/telink/README.md +++ b/examples/window-app/telink/README.md @@ -12,13 +12,13 @@ for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull connectedhomeip/chip-build-telink:latest + $ docker pull ghcr.io/project-chip/chip-build-telink:latest ``` 1. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" connectedhomeip/chip-build-telink:latest + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:latest ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay diff --git a/integrations/README.md b/integrations/README.md index f5d993b05ad4f5..f08c5dd078f700 100644 --- a/integrations/README.md +++ b/integrations/README.md @@ -2,6 +2,3 @@ /integrations are collections of scripts, configurations, and other glue for interacting with tools, services, etc. - -The `ci-only-images` contains images that is used for CI only, and will not be -pushed to docker hub. diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index df2bc35a1fd7bb..82031d7d8ca77c 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -85,7 +85,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index da142a5ed41f94..7e750750f5f76a 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -26,7 +26,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -42,9 +42,21 @@ steps: - name: "gcr.io/cloud-builders/docker" args: - ['/workspace/examples/chef/create_docker.py', '--commit_sha', '$COMMIT_SHA' ,'--short_sha', '$SHORT_SHA', - '--revision_id', '$REVISION_ID', '--build_id', '$BUILD_ID', '--image_name', '$_DOCKER_IMAGE_NAME', - '--tar_path', '/workspace/artifacts'] + [ + "/workspace/examples/chef/create_docker.py", + "--commit_sha", + "$COMMIT_SHA", + "--short_sha", + "$SHORT_SHA", + "--revision_id", + "$REVISION_ID", + "--build_id", + "$BUILD_ID", + "--image_name", + "$_DOCKER_IMAGE_NAME", + "--tar_path", + "/workspace/artifacts", + ] id: DockerAll entrypoint: python3 waitFor: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 5d9b3bec0372b0..ea832591a1afa6 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" git submodule update --init --recursive id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -42,7 +42,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -63,7 +63,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -85,7 +85,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -138,7 +138,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.7.18" + - name: "ghcr.io/project-chip/chip-build-vscode:1" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/integrations/docker/build-all.sh b/integrations/docker/build-all.sh new file mode 100755 index 00000000000000..1d4f48cdabeb7b --- /dev/null +++ b/integrations/docker/build-all.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# +# 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. +# + +# +# temporary wrapper build script until we can build something better +# https://github.com/project-chip/connectedhomeip/issues/710 +# + +set -e + +SUB_PATH="*" +ALL_ARGS="" + +for i in "$@"; do + case $i in + -p=* | --path=*) + SUB_PATH="${i#*=}" + ;; + *) + ALL_ARGS="$ALL_ARGS ${i#*=}" + ;; + esac +done + +echo "SUB_PATH: $SUB_PATH" + +function build_image() { + PARSE_PATH=$1 + ARGS_TO_PASS=$2 + + echo "PARSE_PATH: $PARSE_PATH" + echo "ARGS_TO_PASS: $ARGS_TO_PASS" + + find "$(git rev-parse --show-toplevel)"/integrations/docker/images/"$PARSE_PATH" -name Dockerfile ! -path "*chip-cert-bins/*" | while read -r dockerfile; do + echo "$(dirname "$dockerfile")" + pushd "$(dirname "$dockerfile")" >/dev/null + ./build.sh "$ARGS_TO_PASS" + popd >/dev/null + done +} + +build_image "$SUB_PATH" "$ALL_ARGS" diff --git a/integrations/docker/build.sh b/integrations/docker/build.sh index fefbbadba32bd0..db1976da538a35 100755 --- a/integrations/docker/build.sh +++ b/integrations/docker/build.sh @@ -25,7 +25,8 @@ me=$(basename "$0") cd "$(dirname "$0")" -ORG=${DOCKER_BUILD_ORG:-connectedhomeip} +GHCR_ORG="ghcr.io" +ORG=${DOCKER_BUILD_ORG:-project-chip} # directory name is IMAGE=${DOCKER_BUILD_IMAGE:-$(basename "$(pwd)")} @@ -73,7 +74,7 @@ if [ -f "$DOCKER_VOLUME_PATH" ]; then fi # go find and build any CHIP images this image is "FROM" -awk -F/ '/^FROM connectedhomeip/ {print $2}' Dockerfile | while read -r dep; do +awk -F/ '/^FROM project-chip/ {print $2}' Dockerfile | while read -r dep; do dep=${dep%:*} (cd "../$dep" && ./build.sh "$@") done @@ -84,27 +85,35 @@ if [[ ${*/--no-cache//} != "${*}" ]]; then fi [[ ${*/--skip-build//} != "${*}" ]] || { - docker build "${BUILD_ARGS[@]}" --build-arg TARGETPLATFORM="$TARGET_PLATFORM_TYPE" --build-arg VERSION="$VERSION" -t "$ORG/$IMAGE:$VERSION" . + docker build "${BUILD_ARGS[@]}" --build-arg TARGETPLATFORM="$TARGET_PLATFORM_TYPE" --build-arg VERSION="$VERSION" -t "$GHCR_ORG/$ORG/$IMAGE:$VERSION" . docker image prune --force } [[ ${*/--latest//} != "${*}" ]] && { - docker tag "$ORG"/"$IMAGE":"$VERSION" "$ORG"/"$IMAGE":latest + docker tag "$GHCR_ORG"/"$ORG"/"$IMAGE":"$VERSION" "$GHCR_ORG"/"$ORG"/"$IMAGE":latest } [[ ${*/--squash//} != "${*}" ]] && { command -v docker-squash >/dev/null && - docker-squash "$ORG"/"$IMAGE":"$VERSION" -t "$ORG"/"$IMAGE":latest + docker-squash "$GHCR_ORG"/"$ORG"/"$IMAGE":"$VERSION" -t "$GHCR_ORG"/"$ORG"/"$IMAGE":latest } [[ ${*/--push//} != "${*}" ]] && { - docker push "$ORG"/"$IMAGE":"$VERSION" + docker push "$GHCR_ORG"/"$ORG"/"$IMAGE":"$VERSION" [[ ${*/--latest//} != "${*}" ]] && { - docker push "$ORG"/"$IMAGE":latest + docker push "$GHCR_ORG"/"$ORG"/"$IMAGE":latest } } -docker images --filter=reference="$ORG/*" +[[ ${*/--clear//} != "${*}" ]] && { + docker rmi -f "$GHCR_ORG"/"$ORG"/"$IMAGE":"$VERSION" + [[ ${*/--latest//} != "${*}" ]] && { + docker rmi -f "$GHCR_ORG"/"$ORG"/"$IMAGE":latest + } +} + +docker images --filter=reference="$GHCR_ORG/$ORG/*" + if [ -f "$DOCKER_VOLUME_PATH" ]; then df -h "$DOCKER_VOLUME_PATH" mb_space_after=$(df -m "$DOCKER_VOLUME_PATH" | awk 'FNR==2{print $3}') diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/CHIPCirqueDaemon.py b/integrations/docker/ci-only-images/chip-cirque-device-base/CHIPCirqueDaemon.py deleted file mode 100755 index a96868a4593c67..00000000000000 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/CHIPCirqueDaemon.py +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env python3 - -# 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 logging -import subprocess -import sys -import time -from dataclasses import dataclass -from enum import Enum -from multiprocessing.connection import Client, Listener -from pathlib import Path - -import click - -log = logging.getLogger() -log.setLevel(logging.DEBUG) - -sh = logging.StreamHandler() -sh.setFormatter( - logging.Formatter( - '%(asctime)s [%(name)s] %(levelname)s %(message)s')) -log.addHandler(sh) - - -class CommandStatus(Enum): - """Enum class for passing status code of execute CirqueDaemon command, not CHIP error codes.""" - SUCCESS = 0 - FAILURE = 1 - UNKNOWN_COMMAND = 2 - INVALID_ARGUMENT = 3 - - -@dataclass -class CommandResponse: - """Class for holding status of running CirqueDaemon commands.""" - status_code: CommandStatus - error_message: str = "" - - -class ShellCommand: - def __init__(self, args=None): - self._args = args - - def __call__(self): - if not self._args: - return CommandResponse(CommandStatus.INVALID_ARGUMENT, "Cannot spwan background process") - log.info("Will run command: {}".format(self._args)) - try: - # As the command will be execued in background, we won't return the exit code of the program. - subprocess.Popen( - self._args, stdout=sys.stdout, stderr=sys.stderr) - return CommandResponse(CommandStatus.SUCCESS) - except Exception as ex: - return CommandResponse(CommandStatus.FAILURE, "Failed to run command: {}".format(ex)) - - -class InvalidCommand: - def __init__(self, args=None): - self._args = args - - def __call__(self): - return CommandResponse(CommandStatus.FAILURE, "invalid command") - - -SERVER_ADDRESS = "/tmp/cirque-helper.socket" -CLIENT_WAIT_TIMEOUT_SECONDS = 5 - - -def CommandFactory(args): - commands = { - "run": ShellCommand - } - if len(args) == 0: - return InvalidCommand() - return commands.get(args[0], InvalidCommand)(args[1:]) - - -def ServerMain(args): - extraOptions = { - "otbr-agent": ShellCommand(["otbr-agent", "-I", "wpan0", "-B", "eth0", "spinel+hdlc+uart:///dev/ttyUSB0"]) - } - - with Listener(SERVER_ADDRESS) as listener: - log.info("Server running on {}".format(SERVER_ADDRESS)) - for extraOption in args: - cmd = extraOptions.get(extraOption, InvalidCommand()) - cmd() - - while True: - with listener.accept() as conn: - log.info("Received connection") - cmd = CommandFactory(conn.recv()) - conn.send(cmd()) - - -def ClientMain(args): - if len(args) == 0: - sys.exit(1) - # The server may start very slowly, wait for a few seconds to see if the server will start. - for _ in range(CLIENT_WAIT_TIMEOUT_SECONDS): - socks = Path(SERVER_ADDRESS) - if socks.exists(): - break - time.sleep(1) - # If the address does not exist, Client constructor will throw an exception, so no need to add a flag. - with Client(SERVER_ADDRESS) as conn: - conn.send(args) - res = conn.recv() - print(res) - if res.status_code != CommandStatus.SUCCESS: - sys.exit(1) - - -@click.command() -@click.option('--server', is_flag=True) -@click.argument('command', nargs=-1) -def main(server, command): - if server: - ServerMain(command) - else: - ClientMain(command) - - -if __name__ == '__main__': - main() diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile b/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile deleted file mode 100644 index 465723a5dda193..00000000000000 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -FROM ubuntu:focal - -ARG OT_BR_POSIX_CHECKOUT=master - -ENV DEBIAN_FRONTEND noninteractive -ENV PLATFORM ubuntu -ENV DOCKER 1 -ENV OT_BR_POSIX_CHECKOUT=${OT_BR_POSIX_CHECKOUT} - -RUN mkdir /app - -WORKDIR /app - -RUN apt-cache policy - -# TODO: Use multi stage build for smaller image size. -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - avahi-daemon \ - avahi-utils \ - ca-certificates \ - dhcpcd5 \ - gdb \ - git \ - iproute2 \ - libavahi-client3 \ - libcairo2-dev \ - libdbus-1-dev \ - libgif-dev \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libjpeg-dev \ - psmisc \ - python3-dev \ - python3-pip \ - python3 \ - sudo \ - wireless-tools \ - wpasupplicant \ - && ln -fs /usr/share/zoneinfo/UTC /etc/localtime \ - && git clone https://github.com/openthread/ot-br-posix . \ - && git checkout $OT_BR_POSIX_CHECKOUT \ - && git submodule update --init --depth=1 \ - && ./script/bootstrap \ - && ./script/setup \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - git psmisc ninja-build cmake wget libreadline-dev libncurses-dev libcpputest-dev \ - libavahi-common-dev libavahi-client-dev libboost-dev libboost-filesystem-dev \ - libboost-system-dev libjsoncpp-dev libnetfilter-queue-dev cmake cpputest doxygen \ - && mkdir -p /etc/wpa_supplicant \ - && echo "ctrl_interface=/run/wpa_supplicant" >> /etc/wpa_supplicant/wpa_supplicant.conf \ - && echo "update_config=1" >> /etc/wpa_supplicant/wpa_supplicant.conf \ - && rm -rf /var/lib/apt/lists/* \ - && pip3 install --no-cache-dir click==8.0.3 - -COPY CHIPCirqueDaemon.py /bin/CHIPCirqueDaemon.py -COPY entrypoint.sh /opt/entrypoint.sh - -WORKDIR / - -ENTRYPOINT ["/opt/entrypoint.sh"] - -EXPOSE 80 diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh b/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh deleted file mode 100755 index 7c8856c3d6189d..00000000000000 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash - -# -# 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. -# - -# build.sh - utility for building (and optionally) tagging and pushing -# the a Docker image -# -# This script expects to find a Dockerfile next to $0, so symlink -# in an image name directory is the expected use case. - -set -xe - -me=$(basename "$0") -SOURCE=${BASH_SOURCE[0]} -cd "$(dirname "$SOURCE")" - -SOURCE_DIR=$PWD - -ORG=${DOCKER_BUILD_ORG:-connectedhomeip} - -# directory name is -IMAGE=${DOCKER_BUILD_IMAGE:-$(basename "$(pwd)")} - -# version -VERSION=${DOCKER_BUILD_VERSION:-$(sed 's/ .*//' version)} - -GITHUB_ACTION_RUN=${GITHUB_ACTION_RUN:-"0"} - -REPO_DIR="$SOURCE_DIR/../../../../" - -if [[ "$GITHUB_ACTION_RUN" = "1" ]]; then - # Note: This script will be invoked in docker on CI, We should ensure CHIP repo to safe directory to silent git error messages. - git config --global --add safe.directory /home/runner/work/connectedhomeip/connectedhomeip -fi - -# The image build will clone its own ot-br-posix checkout due to limitations of git submodule. -# Using the same ot-br-posix version as chip -OT_BR_POSIX=$REPO_DIR/third_party/ot-br-posix/repo -OT_BR_POSIX_CHECKOUT=$(cd "$REPO_DIR" && git rev-parse :third_party/ot-br-posix/repo) - -# For chip-cirque-device-base image we use the checkout of ot-br-posix repo -# This is used for not pollute master branch checkout when someone pulls ot-br-posix -# If this fails, the script will still rebuild the image. -CIRQUE_CACHE_PATH=${GITHUB_CACHE_PATH:-"/tmp/cirque-cache/"} -IMAGE_SAVE_PATH="$CIRQUE_CACHE_PATH"/"$IMAGE"_"$OT_BR_POSIX_CHECKOUT".tar - -[[ ${*/--help//} != "${*}" ]] && { - set +x - echo "Usage: $me - - Build and (optionally tag as latest, push) a docker image from Dockerfile in CWD - - Options: - --no-cache passed as a docker build argument - --help get this message - -" - exit 0 -} - -die() { - echo "$me: *** ERROR: $*" - exit 1 -} - -set -ex - -[[ -n $VERSION ]] || die "version cannot be empty" - -# go find and build any CHIP images this image is "FROM" -awk -F/ '/^FROM connectedhomeip/ {print $2}' Dockerfile | while read -r dep; do - dep=${dep%:*} - (cd "../$dep" && ./build.sh "$@") -done - -BUILD_ARGS=() -if [[ ${*/--no-cache//} != "${*}" ]]; then - BUILD_ARGS+=(--no-cache) -else - if docker load -i "$IMAGE_SAVE_PATH"; then - echo "Loaded docker image from Github action cache." - BUILD_ARGS+=(--cache-from "$ORG/$IMAGE") - fi -fi - -docker build -t "$ORG/$IMAGE" -f "$SOURCE_DIR/Dockerfile" "${BUILD_ARGS[@]}" --build-arg OT_BR_POSIX_CHECKOUT="$OT_BR_POSIX_CHECKOUT" "$SOURCE_DIR" - -if [[ "$GITHUB_ACTION_RUN" = "1" ]]; then - # Save cache - mkdir -p "$CIRQUE_CACHE_PATH" - docker save -o "$IMAGE_SAVE_PATH" "$ORG/$IMAGE" - echo "Saved docker image for future run: " - ls -lh "$IMAGE_SAVE_PATH" - chmod 644 "$IMAGE_SAVE_PATH" -fi - -exit 0 diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/cachekey.sh b/integrations/docker/ci-only-images/chip-cirque-device-base/cachekey.sh deleted file mode 100755 index 4e5c754538a5f0..00000000000000 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/cachekey.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -# -# 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. -# - -# build.sh - utility for building (and optionally) tagging and pushing -# the a Docker image -# -# This script expects to output a string that can be used to identify one image. - -me=$(basename "$0") -cd "$(dirname "$0")" - -SOURCE=${BASH_SOURCE[0]} -SOURCE_DIR=$(cd "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd) -REPO_DIR="$SOURCE_DIR/../../../../" - -# The image build will clone its own ot-br-posix checkout due to limitations of git submodule. -# Using the same ot-br-posix version as chip -OT_BR_POSIX=$REPO_DIR/third_party/ot-br-posix/repo -OT_BR_POSIX_CHECKOUT=$(cd "$REPO_DIR" && git rev-parse :third_party/ot-br-posix/repo) - -filehash() { - shasum "$1" | awk '{ print $1 }' -} - -echo "ot-br-posix.$OT_BR_POSIX_CHECKOUT.dockerfile.$(filehash ./Dockerfile)" diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/version b/integrations/docker/ci-only-images/chip-cirque-device-base/version deleted file mode 100644 index 4add8a3f3185ce..00000000000000 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/version +++ /dev/null @@ -1 +0,0 @@ -0.4.21 diff --git a/integrations/docker/images/chip-build-minimal/Dockerfile b/integrations/docker/images/base/chip-build-minimal/Dockerfile similarity index 92% rename from integrations/docker/images/chip-build-minimal/Dockerfile rename to integrations/docker/images/base/chip-build-minimal/Dockerfile index 093943d03a1d3a..f44700ad912842 100644 --- a/integrations/docker/images/chip-build-minimal/Dockerfile +++ b/integrations/docker/images/base/chip-build-minimal/Dockerfile @@ -1,5 +1,6 @@ # This minimal build image is intentionally not based on chip-build FROM ubuntu:focal +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # ARG NINJA_VERSION=v1.11.1 ARG GN_HASH=5a004f9427a050c6c393c07ddb85cba8ff3849fa diff --git a/integrations/docker/images/base/chip-build-minimal/build.sh b/integrations/docker/images/base/chip-build-minimal/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/base/chip-build-minimal/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/base/chip-build-minimal/run.sh b/integrations/docker/images/base/chip-build-minimal/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/base/chip-build-minimal/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-ameba/version b/integrations/docker/images/base/chip-build-minimal/version similarity index 100% rename from integrations/docker/images/chip-build-ameba/version rename to integrations/docker/images/base/chip-build-minimal/version diff --git a/integrations/docker/images/chip-build/Dockerfile b/integrations/docker/images/base/chip-build/Dockerfile similarity index 98% rename from integrations/docker/images/chip-build/Dockerfile rename to integrations/docker/images/base/chip-build/Dockerfile index 643fd361228cfc..60f8cd9a1e015a 100644 --- a/integrations/docker/images/chip-build/Dockerfile +++ b/integrations/docker/images/base/chip-build/Dockerfile @@ -1,5 +1,6 @@ # start with Ubuntu 20.04LTS FROM ubuntu:focal +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip VOLUME "/var/source" diff --git a/integrations/docker/images/chip-build/README.md b/integrations/docker/images/base/chip-build/README.md similarity index 93% rename from integrations/docker/images/chip-build/README.md rename to integrations/docker/images/base/chip-build/README.md index 76260bb2567215..1da8f294c7639b 100644 --- a/integrations/docker/images/chip-build/README.md +++ b/integrations/docker/images/base/chip-build/README.md @@ -1,6 +1,6 @@ # Docker connectedhomeip:chip-build -connectedhomeip/chip-build is the name of the Docker image used by CHIP for +project-chip/chip-build is the name of the Docker image used by CHIP for continuous integration and other builds. Contents of this directory: diff --git a/integrations/docker/images/base/chip-build/build.sh b/integrations/docker/images/base/chip-build/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/base/chip-build/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/base/chip-build/run.sh b/integrations/docker/images/base/chip-build/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/base/chip-build/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version new file mode 100644 index 00000000000000..d00491fd7e5bb6 --- /dev/null +++ b/integrations/docker/images/base/chip-build/version @@ -0,0 +1 @@ +1 diff --git a/integrations/docker/images/chip-build-ameba/build.sh b/integrations/docker/images/chip-build-ameba/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-ameba/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-ameba/run.sh b/integrations/docker/images/chip-build-ameba/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-ameba/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-android/build.sh b/integrations/docker/images/chip-build-android/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-android/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-android/run.sh b/integrations/docker/images/chip-build-android/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-android/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-android/version b/integrations/docker/images/chip-build-android/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-android/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-asr/build.sh b/integrations/docker/images/chip-build-asr/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-asr/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-asr/run.sh b/integrations/docker/images/chip-build-asr/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-asr/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-asr/version b/integrations/docker/images/chip-build-asr/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-asr/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-bouffalolab/Dockerfile b/integrations/docker/images/chip-build-bouffalolab/Dockerfile deleted file mode 100644 index 61695f50adbee2..00000000000000 --- a/integrations/docker/images/chip-build-bouffalolab/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} - -RUN apt update -y \ - && apt install vim -fy \ - && apt clean \ - && pip3 install bflb-iot-tool \ - && : # last line - -COPY setup.sh /tmp - -RUN cd /tmp \ - && bash setup.sh \ - && rm setup.sh \ - && : # last line - -ENV BOUFFALOLAB_SDK_ROOT=/opt/bouffalolab_sdk diff --git a/integrations/docker/images/chip-build-bouffalolab/build.sh b/integrations/docker/images/chip-build-bouffalolab/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-bouffalolab/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-bouffalolab/run.sh b/integrations/docker/images/chip-build-bouffalolab/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-bouffalolab/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-bouffalolab/version b/integrations/docker/images/chip-build-bouffalolab/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-bouffalolab/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-cirque/Dockerfile b/integrations/docker/images/chip-build-cirque/Dockerfile deleted file mode 100644 index e6b1b8d1b023a7..00000000000000 --- a/integrations/docker/images/chip-build-cirque/Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} - -# Bazel -RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ - curl gnupg \ - && curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg \ - && mv bazel.gpg /etc/apt/trusted.gpg.d/ \ - && echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ - bazel \ - && : # aids diffs - -# Docker -RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ - curl gnupg-agent apt-transport-https ca-certificates \ - software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && python3.8 `which add-apt-repository` \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ - docker-ce docker-ce-cli containerd.io \ - && : # aids diffs - -# Other Cirque prereqs -RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ - sudo socat psmisc tigervnc-standalone-server xorg xauth \ - python3-pip python3-venv libdbus-glib-1-dev \ - uuid-runtime libgirepository1.0-dev \ - && : # aids diffs - -COPY requirements_nogrpc.txt /requirements.txt - -RUN set -x \ - && pip3 install -r requirements.txt \ - && xinit -- /usr/bin/Xvnc \ - && : # aids diffs diff --git a/integrations/docker/images/chip-build-cirque/README.md b/integrations/docker/images/chip-build-cirque/README.md deleted file mode 100644 index ad46899bcedd9e..00000000000000 --- a/integrations/docker/images/chip-build-cirque/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Docker connectedhomeip:chip-build-cirque - -connectedhomeip/chip-build-cirque is the name of the Docker image used by CHIP -for continuous integration and other builds when using Cirque. It builds upon -the chip-build image and adds system dependencies needed by Cirque. - -Contents of this directory: - -- build.sh - utility for building (and optionally) tagging and pushing the - chip-build Docker image -- version - the semver-style version of the image in use for this branch of - CHIP -- Dockerfile - description of the image - -Please update version when any required tooling is updated. Some rough -guidelines: - -- Updating a tool? Increment dot version unless the tool has a major version - delta or a backward incompatibility -- Adding a tool? Increment minor version: e.g. 0.2.1 -> 0.3.0 -- Removing a tool? Increment major version: e.g. 1.2 -> 2.0 - -Note, you must have privileged access to the connectedhomeip area on Docker Hub -to push the image. - -Typical use: - -1. new build tool dependency identified -2. add tool to Dockerfile -3. update version -4. `$ ./build.sh`, which installs the image locally as the new version -5. update the image version in the devcontainer.json and CI manifests -6. verify that the build works locally in the new image -7. `$ docker login` -8. `$ ./build.sh --push --latest`, _*Note:*_ omit `--latest` unless on the - master branch diff --git a/integrations/docker/images/chip-build-cirque/build.sh b/integrations/docker/images/chip-build-cirque/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-cirque/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-cirque/requirements_nogrpc.txt b/integrations/docker/images/chip-build-cirque/requirements_nogrpc.txt deleted file mode 100644 index 508ad6d8ddef61..00000000000000 --- a/integrations/docker/images/chip-build-cirque/requirements_nogrpc.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmd2 -docker >= 4.1.0 -flask == 2.2.2 -pycodestyle >= 2.5.0 -pylint == 2.4 -pyroute2 >= 0.5.7 -six >= 1.12 -toml diff --git a/integrations/docker/images/chip-build-cirque/run.sh b/integrations/docker/images/chip-build-cirque/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-cirque/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-cirque/version b/integrations/docker/images/chip-build-cirque/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-cirque/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-crosscompile/build.sh b/integrations/docker/images/chip-build-crosscompile/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-crosscompile/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-crosscompile/run.sh b/integrations/docker/images/chip-build-crosscompile/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-crosscompile/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-crosscompile/version b/integrations/docker/images/chip-build-crosscompile/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-crosscompile/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-doxygen/build.sh b/integrations/docker/images/chip-build-doxygen/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-doxygen/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-doxygen/run.sh b/integrations/docker/images/chip-build-doxygen/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-doxygen/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-doxygen/version b/integrations/docker/images/chip-build-doxygen/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-doxygen/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-efr32/build.sh b/integrations/docker/images/chip-build-efr32/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-efr32/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-efr32/run.sh b/integrations/docker/images/chip-build-efr32/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-efr32/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-efr32/version b/integrations/docker/images/chip-build-efr32/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-efr32/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-esp32-qemu/build.sh b/integrations/docker/images/chip-build-esp32-qemu/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-esp32-qemu/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-esp32-qemu/run.sh b/integrations/docker/images/chip-build-esp32-qemu/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-esp32-qemu/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-esp32-qemu/version b/integrations/docker/images/chip-build-esp32-qemu/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-esp32-qemu/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-esp32/build.sh b/integrations/docker/images/chip-build-esp32/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-esp32/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-esp32/run.sh b/integrations/docker/images/chip-build-esp32/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-esp32/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-esp32/version b/integrations/docker/images/chip-build-esp32/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-esp32/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-imx/build.sh b/integrations/docker/images/chip-build-imx/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-imx/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-imx/run.sh b/integrations/docker/images/chip-build-imx/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-imx/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-imx/version b/integrations/docker/images/chip-build-imx/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-imx/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-infineon/build.sh b/integrations/docker/images/chip-build-infineon/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-infineon/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-infineon/run.sh b/integrations/docker/images/chip-build-infineon/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-infineon/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-infineon/version b/integrations/docker/images/chip-build-infineon/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-infineon/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-java/build.sh b/integrations/docker/images/chip-build-java/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-java/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-java/run.sh b/integrations/docker/images/chip-build-java/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-java/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-java/version b/integrations/docker/images/chip-build-java/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-java/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-k32w/build.sh b/integrations/docker/images/chip-build-k32w/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-k32w/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-k32w/run.sh b/integrations/docker/images/chip-build-k32w/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-k32w/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-k32w/version b/integrations/docker/images/chip-build-k32w/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-k32w/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-mbed-os/build.sh b/integrations/docker/images/chip-build-mbed-os/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-mbed-os/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-mbed-os/run.sh b/integrations/docker/images/chip-build-mbed-os/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-mbed-os/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-mbed-os/version b/integrations/docker/images/chip-build-mbed-os/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-mbed-os/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-minimal/build.sh b/integrations/docker/images/chip-build-minimal/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-minimal/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-minimal/run.sh b/integrations/docker/images/chip-build-minimal/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-minimal/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-minimal/version b/integrations/docker/images/chip-build-minimal/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-minimal/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-nrf-platform/build.sh b/integrations/docker/images/chip-build-nrf-platform/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-nrf-platform/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-nrf-platform/run.sh b/integrations/docker/images/chip-build-nrf-platform/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-nrf-platform/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-nrf-platform/version b/integrations/docker/images/chip-build-nrf-platform/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-nrf-platform/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-openiotsdk/build.sh b/integrations/docker/images/chip-build-openiotsdk/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-openiotsdk/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-openiotsdk/run.sh b/integrations/docker/images/chip-build-openiotsdk/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-openiotsdk/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-openiotsdk/version b/integrations/docker/images/chip-build-openiotsdk/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-openiotsdk/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-telink/build.sh b/integrations/docker/images/chip-build-telink/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-telink/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-telink/run.sh b/integrations/docker/images/chip-build-telink/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-telink/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-telink/version b/integrations/docker/images/chip-build-telink/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-telink/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-ti/build.sh b/integrations/docker/images/chip-build-ti/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-ti/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-ti/run.sh b/integrations/docker/images/chip-build-ti/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-ti/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-ti/version b/integrations/docker/images/chip-build-ti/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-ti/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen-qemu/build.sh b/integrations/docker/images/chip-build-tizen-qemu/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-tizen-qemu/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen-qemu/run.sh b/integrations/docker/images/chip-build-tizen-qemu/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-tizen-qemu/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen-qemu/version b/integrations/docker/images/chip-build-tizen-qemu/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-tizen-qemu/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen/build.sh b/integrations/docker/images/chip-build-tizen/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-tizen/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen/run.sh b/integrations/docker/images/chip-build-tizen/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-tizen/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen/version b/integrations/docker/images/chip-build-tizen/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-tizen/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-vscode/build.sh b/integrations/docker/images/chip-build-vscode/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build-vscode/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-vscode/run.sh b/integrations/docker/images/chip-build-vscode/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build-vscode/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-vscode/version b/integrations/docker/images/chip-build-vscode/version deleted file mode 120000 index a4280acd348e7f..00000000000000 --- a/integrations/docker/images/chip-build-vscode/version +++ /dev/null @@ -1 +0,0 @@ -../chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build/build.sh b/integrations/docker/images/chip-build/build.sh deleted file mode 120000 index fcb4d4ee75d531..00000000000000 --- a/integrations/docker/images/chip-build/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build/run.sh b/integrations/docker/images/chip-build/run.sh deleted file mode 120000 index ccbd3501b330d9..00000000000000 --- a/integrations/docker/images/chip-build/run.sh +++ /dev/null @@ -1 +0,0 @@ -../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version deleted file mode 100644 index 5cbd46145c3df6..00000000000000 --- a/integrations/docker/images/chip-build/version +++ /dev/null @@ -1 +0,0 @@ -0.7.25 Version bump reason: Update silabs GSDK version diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index 31ea9711475967..9046a2cb346fea 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -1,5 +1,6 @@ # Stage 1: Setup dependencies (based on chip-build). FROM ubuntu:22.04 as chip-build-cert +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip ARG TARGETPLATFORM # COMMITHASH defines the target commit to build from. May be passed in using --build-arg. ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb @@ -11,22 +12,22 @@ ARG ZAP_VERSION=v2023.05.22-nightly # Ensure TARGETPLATFORM is set RUN case ${TARGETPLATFORM} in \ - "linux/amd64") \ - echo "Building for linux/amd64" \ - ;; \ - "linux/arm64") \ - echo "Building for linux/arm64" \ - ;; \ - *) \ - if [ -z "$TARGETPLATFORM" ] ;\ - then \ - echo "TARGETPLATFORM not defined! Please run from buildkit (buildx)." \ - && return 1 ;\ - else \ - echo "Unsupported platform ${TARGETPLATFORM}." \ - && return 1 ;\ - fi \ - ;; \ + "linux/amd64") \ + echo "Building for linux/amd64" \ + ;; \ + "linux/arm64") \ + echo "Building for linux/arm64" \ + ;; \ + *) \ + if [ -z "$TARGETPLATFORM" ] ;\ + then \ + echo "TARGETPLATFORM not defined! Please run from buildkit (buildx)." \ + && return 1 ;\ + else \ + echo "Unsupported platform ${TARGETPLATFORM}." \ + && return 1 ;\ + fi \ + ;; \ esac # Below should be the same as chip-build except arm64 logic for cmake and node. @@ -96,25 +97,25 @@ RUN set -x \ # Cmake (Mbed OS requires >=3.19.0-rc3 version which is not available in Ubuntu 20.04 repository) RUN case ${TARGETPLATFORM} in \ - "linux/amd64") \ - set -x \ - && (cd /tmp \ - && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh \ - && sh cmake-3.19.3-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \ - && rm -rf cmake-3.19.3-Linux-x86_64.sh) \ - && exec bash \ - ;; \ - "linux/arm64") \ - set -x \ - && (cd /tmp \ - && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-aarch64.sh \ - && sh cmake-3.19.3-Linux-aarch64.sh --exclude-subdir --prefix=/usr/local \ - && rm -rf cmake-3.19.3-Linux-aarch64.sh) \ - && exec bash \ - ;; \ - *) \ - test -n "$TARGETPLATFORM" \ - echo "Unsupported platform ${TARGETPLATFORM}" \ + "linux/amd64") \ + set -x \ + && (cd /tmp \ + && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh \ + && sh cmake-3.19.3-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \ + && rm -rf cmake-3.19.3-Linux-x86_64.sh) \ + && exec bash \ + ;; \ + "linux/arm64") \ + set -x \ + && (cd /tmp \ + && wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-aarch64.sh \ + && sh cmake-3.19.3-Linux-aarch64.sh --exclude-subdir --prefix=/usr/local \ + && rm -rf cmake-3.19.3-Linux-aarch64.sh) \ + && exec bash \ + ;; \ + *) \ + test -n "$TARGETPLATFORM" \ + echo "Unsupported platform ${TARGETPLATFORM}" \ ;; \ esac @@ -159,31 +160,31 @@ RUN set -x \ # NodeJS: install a newer version than what apt-get would read # This installs the latest LTS version of nodejs RUN case ${TARGETPLATFORM} in \ - "linux/amd64") \ - set -x \ - && mkdir node_js \ - && cd node_js \ - && wget https://nodejs.org/dist/v12.22.12/node-v12.22.12-linux-x64.tar.xz \ - && tar xfvJ node-v12.22.12-linux-x64.tar.xz \ - && mv node-v12.22.12-linux-x64 /opt/ \ - && ln -s /opt/node-v12.22.12-linux-x64 /opt/node \ - && ln -s /opt/node/bin/* /usr/bin \ - && cd .. \ - && rm -rf node_js \ - ;; \ - "linux/arm64")\ - set -x \ - && mkdir node_js \ - && cd node_js \ - && wget https://nodejs.org/dist/v12.22.12/node-v12.22.12-linux-arm64.tar.xz \ - && tar xfvJ node-v12.22.12-linux-arm64.tar.xz \ - && mv node-v12.22.12-linux-arm64 /opt/ \ - && ln -s /opt/node-v12.22.12-linux-arm64 /opt/node \ - && ln -s /opt/node/bin/* /usr/bin \ - && cd .. \ - && rm -rf node_js \ - ;; \ - *) ;; \ + "linux/amd64") \ + set -x \ + && mkdir node_js \ + && cd node_js \ + && wget https://nodejs.org/dist/v12.22.12/node-v12.22.12-linux-x64.tar.xz \ + && tar xfvJ node-v12.22.12-linux-x64.tar.xz \ + && mv node-v12.22.12-linux-x64 /opt/ \ + && ln -s /opt/node-v12.22.12-linux-x64 /opt/node \ + && ln -s /opt/node/bin/* /usr/bin \ + && cd .. \ + && rm -rf node_js \ + ;; \ + "linux/arm64")\ + set -x \ + && mkdir node_js \ + && cd node_js \ + && wget https://nodejs.org/dist/v12.22.12/node-v12.22.12-linux-arm64.tar.xz \ + && tar xfvJ node-v12.22.12-linux-arm64.tar.xz \ + && mv node-v12.22.12-linux-arm64 /opt/ \ + && ln -s /opt/node-v12.22.12-linux-arm64 /opt/node \ + && ln -s /opt/node/bin/* /usr/bin \ + && cd .. \ + && rm -rf node_js \ + ;; \ + *) ;; \ esac RUN set -x \ @@ -217,63 +218,63 @@ SHELL ["/bin/bash", "-c"] RUN git rev-parse HEAD > /root/.sdk-sha-version RUN case ${TARGETPLATFORM} in \ - "linux/amd64") \ - set -x \ - && source scripts/activate.sh \ - && scripts/build/build_examples.py \ - --target linux-x64-all-clusters-ipv6only \ - --target linux-x64-all-clusters-minimal-ipv6only \ - --target linux-x64-bridge-ipv6only \ - --target linux-x64-tv-app-ipv6only \ - --target linux-x64-tv-casting-app-ipv6only \ - --target linux-x64-light-ipv6only \ - --target linux-x64-thermostat-ipv6only \ - --target linux-x64-ota-provider-ipv6only \ - --target linux-x64-ota-requestor-ipv6only \ - --target linux-x64-lock-ipv6only \ - --target linux-x64-simulated-app1-ipv6only \ - build \ - && mv out/linux-x64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ - && mv out/linux-x64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ - && mv out/linux-x64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ - && mv out/linux-x64-tv-app-ipv6only/chip-tv-app out/chip-tv-app \ - && mv out/linux-x64-tv-casting-app-ipv6only/chip-tv-casting-app out/chip-tv-casting-app \ - && mv out/linux-x64-light-ipv6only/chip-lighting-app out/chip-lighting-app \ - && mv out/linux-x64-thermostat-ipv6only/thermostat-app out/thermostat-app \ - && mv out/linux-x64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \ - && mv out/linux-x64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \ - && mv out/linux-x64-lock-ipv6only/chip-lock-app out/chip-lock-app \ - && mv out/linux-x64-simulated-app1-ipv6only/chip-app1 out/chip-app1 \ - ;; \ - "linux/arm64")\ - set -x \ - && source scripts/activate.sh \ - && scripts/build/build_examples.py \ - --target linux-arm64-all-clusters-ipv6only \ - --target linux-arm64-all-clusters-minimal-ipv6only \ - --target linux-arm64-bridge-ipv6only \ - --target linux-arm64-tv-app-ipv6only \ - --target linux-arm64-tv-casting-app-ipv6only \ - --target linux-arm64-light-ipv6only \ - --target linux-arm64-thermostat-ipv6only \ - --target linux-arm64-ota-provider-ipv6only \ - --target linux-arm64-ota-requestor-ipv6only \ - --target linux-arm64-lock-ipv6only \ - --target linux-arm64-simulated-app1-ipv6only \ - build \ - && mv out/linux-arm64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ - && mv out/linux-arm64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ - && mv out/linux-arm64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ - && mv out/linux-arm64-tv-app-ipv6only/chip-tv-app out/chip-tv-app \ - && mv out/linux-arm64-tv-casting-app-ipv6only/chip-tv-casting-app out/chip-tv-casting-app \ - && mv out/linux-arm64-light-ipv6only/chip-lighting-app out/chip-lighting-app \ - && mv out/linux-arm64-thermostat-ipv6only/thermostat-app out/thermostat-app \ - && mv out/linux-arm64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \ - && mv out/linux-arm64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \ - && mv out/linux-arm64-lock-ipv6only/chip-lock-app out/chip-lock-app \ - && mv out/linux-arm64-simulated-app1-ipv6only/chip-app1 out/chip-app1 \ - ;; \ - *) ;; \ + "linux/amd64") \ + set -x \ + && source scripts/activate.sh \ + && scripts/build/build_examples.py \ + --target linux-x64-all-clusters-ipv6only \ + --target linux-x64-all-clusters-minimal-ipv6only \ + --target linux-x64-bridge-ipv6only \ + --target linux-x64-tv-app-ipv6only \ + --target linux-x64-tv-casting-app-ipv6only \ + --target linux-x64-light-ipv6only \ + --target linux-x64-thermostat-ipv6only \ + --target linux-x64-ota-provider-ipv6only \ + --target linux-x64-ota-requestor-ipv6only \ + --target linux-x64-lock-ipv6only \ + --target linux-x64-simulated-app1-ipv6only \ + build \ + && mv out/linux-x64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ + && mv out/linux-x64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ + && mv out/linux-x64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ + && mv out/linux-x64-tv-app-ipv6only/chip-tv-app out/chip-tv-app \ + && mv out/linux-x64-tv-casting-app-ipv6only/chip-tv-casting-app out/chip-tv-casting-app \ + && mv out/linux-x64-light-ipv6only/chip-lighting-app out/chip-lighting-app \ + && mv out/linux-x64-thermostat-ipv6only/thermostat-app out/thermostat-app \ + && mv out/linux-x64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \ + && mv out/linux-x64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \ + && mv out/linux-x64-lock-ipv6only/chip-lock-app out/chip-lock-app \ + && mv out/linux-x64-simulated-app1-ipv6only/chip-app1 out/chip-app1 \ + ;; \ + "linux/arm64")\ + set -x \ + && source scripts/activate.sh \ + && scripts/build/build_examples.py \ + --target linux-arm64-all-clusters-ipv6only \ + --target linux-arm64-all-clusters-minimal-ipv6only \ + --target linux-arm64-bridge-ipv6only \ + --target linux-arm64-tv-app-ipv6only \ + --target linux-arm64-tv-casting-app-ipv6only \ + --target linux-arm64-light-ipv6only \ + --target linux-arm64-thermostat-ipv6only \ + --target linux-arm64-ota-provider-ipv6only \ + --target linux-arm64-ota-requestor-ipv6only \ + --target linux-arm64-lock-ipv6only \ + --target linux-arm64-simulated-app1-ipv6only \ + build \ + && mv out/linux-arm64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \ + && mv out/linux-arm64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \ + && mv out/linux-arm64-bridge-ipv6only/chip-bridge-app out/chip-bridge-app \ + && mv out/linux-arm64-tv-app-ipv6only/chip-tv-app out/chip-tv-app \ + && mv out/linux-arm64-tv-casting-app-ipv6only/chip-tv-casting-app out/chip-tv-casting-app \ + && mv out/linux-arm64-light-ipv6only/chip-lighting-app out/chip-lighting-app \ + && mv out/linux-arm64-thermostat-ipv6only/thermostat-app out/thermostat-app \ + && mv out/linux-arm64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \ + && mv out/linux-arm64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \ + && mv out/linux-arm64-lock-ipv6only/chip-lock-app out/chip-lock-app \ + && mv out/linux-arm64-simulated-app1-ipv6only/chip-app1 out/chip-app1 \ + ;; \ + *) ;; \ esac RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true -i no diff --git a/integrations/docker/images/chip-build-crosscompile/.gitignore b/integrations/docker/images/stage-1/chip-build-crosscompile/.gitignore similarity index 100% rename from integrations/docker/images/chip-build-crosscompile/.gitignore rename to integrations/docker/images/stage-1/chip-build-crosscompile/.gitignore diff --git a/integrations/docker/images/chip-build-crosscompile/Dockerfile b/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile similarity index 83% rename from integrations/docker/images/chip-build-crosscompile/Dockerfile rename to integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile index 0dfb3328b79798..64636dd42c5d64 100644 --- a/integrations/docker/images/chip-build-crosscompile/Dockerfile +++ b/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} as build +FROM ghcr.io/project-chip/chip-build:${VERSION} as build +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ @@ -26,7 +27,8 @@ RUN set -x \ && rm -rf /opt/ubuntu-22.04.1-aarch64-sysroot/lib/modules \ && : # last line -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip COPY --from=build /opt/ubuntu-22.04.1-aarch64-sysroot/ /opt/ubuntu-22.04.1-aarch64-sysroot/ diff --git a/integrations/docker/images/chip-build-crosscompile/README.md b/integrations/docker/images/stage-1/chip-build-crosscompile/README.md similarity index 100% rename from integrations/docker/images/chip-build-crosscompile/README.md rename to integrations/docker/images/stage-1/chip-build-crosscompile/README.md diff --git a/integrations/docker/images/stage-1/chip-build-crosscompile/build.sh b/integrations/docker/images/stage-1/chip-build-crosscompile/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-1/chip-build-crosscompile/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-1/chip-build-crosscompile/run.sh b/integrations/docker/images/stage-1/chip-build-crosscompile/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-1/chip-build-crosscompile/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-1/chip-build-crosscompile/version b/integrations/docker/images/stage-1/chip-build-crosscompile/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-1/chip-build-crosscompile/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile similarity index 85% rename from integrations/docker/images/chip-build-ameba/Dockerfile rename to integrations/docker/images/stage-2/chip-build-ameba/Dockerfile index 931fd984911c37..db3ae1ca842ebe 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # Setup Ameba ARG AMEBA_DIR=/opt/ameba diff --git a/integrations/docker/images/stage-2/chip-build-ameba/build.sh b/integrations/docker/images/stage-2/chip-build-ameba/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-ameba/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-ameba/run.sh b/integrations/docker/images/stage-2/chip-build-ameba/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-ameba/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-ameba/version b/integrations/docker/images/stage-2/chip-build-ameba/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-ameba/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-asr/Dockerfile b/integrations/docker/images/stage-2/chip-build-asr/Dockerfile similarity index 85% rename from integrations/docker/images/chip-build-asr/Dockerfile rename to integrations/docker/images/stage-2/chip-build-asr/Dockerfile index 49ddaad6332789..c00b97a6763b95 100644 --- a/integrations/docker/images/chip-build-asr/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-asr/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ diff --git a/integrations/docker/images/stage-2/chip-build-asr/build.sh b/integrations/docker/images/stage-2/chip-build-asr/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-asr/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-asr/run.sh b/integrations/docker/images/stage-2/chip-build-asr/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-asr/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-asr/version b/integrations/docker/images/stage-2/chip-build-asr/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-asr/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-bouffalolab/Dockerfile b/integrations/docker/images/stage-2/chip-build-bouffalolab/Dockerfile new file mode 100644 index 00000000000000..3a90bd9b00be43 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-bouffalolab/Dockerfile @@ -0,0 +1,18 @@ +ARG VERSION=latest +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip + +RUN apt update -y \ + && apt install vim -fy \ + && apt clean \ + && pip3 install bflb-iot-tool \ + && : # last line + +COPY setup.sh /tmp + +RUN cd /tmp \ + && bash setup.sh \ + && rm setup.sh \ + && : # last line + +ENV BOUFFALOLAB_SDK_ROOT=/opt/bouffalolab_sdk diff --git a/integrations/docker/images/stage-2/chip-build-bouffalolab/build.sh b/integrations/docker/images/stage-2/chip-build-bouffalolab/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-bouffalolab/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-bouffalolab/run.sh b/integrations/docker/images/stage-2/chip-build-bouffalolab/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-bouffalolab/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-bouffalolab/setup.sh b/integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh similarity index 100% rename from integrations/docker/images/chip-build-bouffalolab/setup.sh rename to integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh diff --git a/integrations/docker/images/stage-2/chip-build-bouffalolab/version b/integrations/docker/images/stage-2/chip-build-bouffalolab/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-bouffalolab/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-doxygen/Dockerfile b/integrations/docker/images/stage-2/chip-build-doxygen/Dockerfile similarity index 56% rename from integrations/docker/images/chip-build-doxygen/Dockerfile rename to integrations/docker/images/stage-2/chip-build-doxygen/Dockerfile index f9bff774d696b5..82ea47419e792b 100644 --- a/integrations/docker/images/chip-build-doxygen/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-doxygen/Dockerfile @@ -1,4 +1,5 @@ FROM alpine:3.15 +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN apk --no-cache add \ doxygen=1.9.2-r1 \ diff --git a/integrations/docker/images/stage-2/chip-build-doxygen/build.sh b/integrations/docker/images/stage-2/chip-build-doxygen/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-doxygen/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-doxygen/run.sh b/integrations/docker/images/stage-2/chip-build-doxygen/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-doxygen/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-doxygen/version b/integrations/docker/images/stage-2/chip-build-doxygen/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-doxygen/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-efr32/Dockerfile b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile similarity index 83% rename from integrations/docker/images/chip-build-efr32/Dockerfile rename to integrations/docker/images/stage-2/chip-build-efr32/Dockerfile index 3f55636e0e1b6a..6769daef681402 100644 --- a/integrations/docker/images/chip-build-efr32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # GNU ARM Embedded toolchain, cross compiler for various platform builds RUN set -x \ @@ -17,7 +18,10 @@ RUN set -x \ #Clone Gecko SDK 4.2.0 (ef05eb6) -RUN git clone --depth=1 --branch=v4.2.3 https://github.com/SiliconLabs/gecko_sdk.git +RUN git clone --depth=1 --branch=v4.2.3 https://github.com/SiliconLabs/gecko_sdk.git && \ + cd gecko_sdk && \ + rm -rf .git \ + && : # last line ENV GSDK_ROOT=/gecko_sdk/ diff --git a/integrations/docker/images/stage-2/chip-build-efr32/build.sh b/integrations/docker/images/stage-2/chip-build-efr32/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-efr32/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-efr32/run.sh b/integrations/docker/images/stage-2/chip-build-efr32/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-efr32/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-efr32/version b/integrations/docker/images/stage-2/chip-build-efr32/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-efr32/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-esp32/Dockerfile b/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile similarity index 76% rename from integrations/docker/images/chip-build-esp32/Dockerfile rename to integrations/docker/images/stage-2/chip-build-esp32/Dockerfile index 0a512b4a2895d9..7f7b8a9c7da83b 100644 --- a/integrations/docker/images/chip-build-esp32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} as build +FROM ghcr.io/project-chip/chip-build:${VERSION} as build +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ @@ -13,7 +14,7 @@ RUN set -x \ && git clone --recursive -b v4.4.4 --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git /tmp/esp-idf \ && : # last line -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} ENV IDF_PATH=/opt/espressif/esp-idf/ ENV IDF_TOOLS_PATH=/opt/espressif/tools diff --git a/integrations/docker/images/stage-2/chip-build-esp32/build.sh b/integrations/docker/images/stage-2/chip-build-esp32/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-esp32/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-esp32/run.sh b/integrations/docker/images/stage-2/chip-build-esp32/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-esp32/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-esp32/version b/integrations/docker/images/stage-2/chip-build-esp32/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-esp32/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-imx/Dockerfile b/integrations/docker/images/stage-2/chip-build-imx/Dockerfile similarity index 81% rename from integrations/docker/images/chip-build-imx/Dockerfile rename to integrations/docker/images/stage-2/chip-build-imx/Dockerfile index f5defda3618820..35ab85f986cda1 100644 --- a/integrations/docker/images/chip-build-imx/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-imx/Dockerfile @@ -1,5 +1,7 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} as build +FROM ghcr.io/project-chip/chip-build:${VERSION} as build +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip + RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ @@ -20,7 +22,7 @@ RUN set -x \ && find . -iname ".debug" -exec rm -rf "{}" + || true \ && : # last line -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} COPY --from=build /opt/fsl-imx-xwayland /opt/fsl-imx-xwayland diff --git a/integrations/docker/images/stage-2/chip-build-imx/build.sh b/integrations/docker/images/stage-2/chip-build-imx/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-imx/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-imx/run.sh b/integrations/docker/images/stage-2/chip-build-imx/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-imx/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-imx/version b/integrations/docker/images/stage-2/chip-build-imx/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-imx/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-infineon/Dockerfile b/integrations/docker/images/stage-2/chip-build-infineon/Dockerfile similarity index 74% rename from integrations/docker/images/chip-build-infineon/Dockerfile rename to integrations/docker/images/stage-2/chip-build-infineon/Dockerfile index 5df88c43b7eeea..9b2ef70394bf52 100644 --- a/integrations/docker/images/chip-build-infineon/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-infineon/Dockerfile @@ -1,17 +1,18 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # ------------------------------------------------------------------------------ # Install prerequisites RUN apt update -y \ - && apt install -y curl git make file libglib2.0-0 libusb-1.0-0 libncurses5 sudo \ - && apt clean + && apt install -y curl git make file libglib2.0-0 libusb-1.0-0 libncurses5 sudo \ + && apt clean # ------------------------------------------------------------------------------ # Download and extract ModusToolbox 2.3 RUN curl --fail --location --silent --show-error https://itoolspriv.infineon.com/itbhs/api/packages/com.ifx.tb.tool.modustoolbox/Versions/2.4.0.5972-public/artifacts/ModusToolbox_2.4.0.5972-linux-install.tar.gz/download?noredirect -o /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz \ - && tar -C /opt -zxf /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz \ - && rm /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz + && tar -C /opt -zxf /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz \ + && rm /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz # ------------------------------------------------------------------------------ # Execute post-build scripts diff --git a/integrations/docker/images/stage-2/chip-build-infineon/build.sh b/integrations/docker/images/stage-2/chip-build-infineon/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-infineon/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-infineon/run.sh b/integrations/docker/images/stage-2/chip-build-infineon/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-infineon/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-infineon/version b/integrations/docker/images/stage-2/chip-build-infineon/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-infineon/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-java/Dockerfile b/integrations/docker/images/stage-2/chip-build-java/Dockerfile similarity index 75% rename from integrations/docker/images/chip-build-java/Dockerfile rename to integrations/docker/images/stage-2/chip-build-java/Dockerfile index a55801e0ac1d6b..e0958294e5ed8e 100644 --- a/integrations/docker/images/chip-build-java/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-java/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # Download and install kotlin compiler RUN set -x \ diff --git a/integrations/docker/images/stage-2/chip-build-java/build.sh b/integrations/docker/images/stage-2/chip-build-java/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-java/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-java/run.sh b/integrations/docker/images/stage-2/chip-build-java/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-java/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-java/version b/integrations/docker/images/stage-2/chip-build-java/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-java/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-k32w/Dockerfile b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile similarity index 73% rename from integrations/docker/images/chip-build-k32w/Dockerfile rename to integrations/docker/images/stage-2/chip-build-k32w/Dockerfile index 41e779c8fdd613..bef2b594d6b519 100644 --- a/integrations/docker/images/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} as build +FROM ghcr.io/project-chip/chip-build:${VERSION} as build +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ @@ -17,7 +18,7 @@ RUN set -x \ && rm -rf SDK_2_6_11_K32W061DK6.zip \ && : # last line -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} COPY --from=build /opt/sdk/ /opt/sdk/ diff --git a/integrations/docker/images/stage-2/chip-build-k32w/build.sh b/integrations/docker/images/stage-2/chip-build-k32w/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-k32w/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-k32w/run.sh b/integrations/docker/images/stage-2/chip-build-k32w/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-k32w/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-k32w/version b/integrations/docker/images/stage-2/chip-build-k32w/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-k32w/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-mbed-os/Dockerfile b/integrations/docker/images/stage-2/chip-build-mbed-os/Dockerfile similarity index 66% rename from integrations/docker/images/chip-build-mbed-os/Dockerfile rename to integrations/docker/images/stage-2/chip-build-mbed-os/Dockerfile index 459bca5d6bdf38..ea574b0094b216 100644 --- a/integrations/docker/images/chip-build-mbed-os/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-mbed-os/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} as build +FROM ghcr.io/project-chip/chip-build:${VERSION} as build +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ @@ -11,15 +12,15 @@ RUN set -x \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # ------------------------------------------------------------------------------ -# Install openocd -RUN set -x \ - && mkdir -p /opt/openocd \ - && wget -O - --progress=dot:giga https://github.com/cypresssemiconductorco/openocd/releases/download/release-v4.2.0/openocd-4.2.0.1430-linux.tar.gz | tar --strip-components=1 -xz -C /opt/openocd \ - && : # last line +# # Install openocd +# RUN set -x \ +# && mkdir -p /opt/openocd \ +# && wget -O - --progress=dot:giga https://github.com/cypresssemiconductorco/openocd/releases/download/release-v4.2.0/openocd-4.2.0.1430-linux.tar.gz | tar --strip-components=1 -xz -C /opt/openocd \ +# && : # last line -FROM connectedhomeip/chip-build:${VERSION} +# FROM ghcr.io/project-chip/chip-build:${VERSION} -COPY --from=build /opt/openocd/ /opt/openocd/ +# COPY --from=build /opt/openocd/ /opt/openocd/ # ------------------------------------------------------------------------------ # Install Python modules diff --git a/integrations/docker/images/stage-2/chip-build-mbed-os/build.sh b/integrations/docker/images/stage-2/chip-build-mbed-os/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-mbed-os/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-mbed-os/run.sh b/integrations/docker/images/stage-2/chip-build-mbed-os/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-mbed-os/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-mbed-os/version b/integrations/docker/images/stage-2/chip-build-mbed-os/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-mbed-os/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-nrf-platform/Dockerfile b/integrations/docker/images/stage-2/chip-build-nrf-platform/Dockerfile similarity index 94% rename from integrations/docker/images/chip-build-nrf-platform/Dockerfile rename to integrations/docker/images/stage-2/chip-build-nrf-platform/Dockerfile index 7da1614c5bea04..518e722e72d62d 100644 --- a/integrations/docker/images/chip-build-nrf-platform/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-nrf-platform/Dockerfile @@ -4,7 +4,8 @@ ARG VERSION=latest # Temporary image for SDK and dependencies download # ================================================== -FROM connectedhomeip/chip-build:${VERSION} as build +FROM ghcr.io/project-chip/chip-build:${VERSION} as build +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # Compatible Nordic Connect SDK revision. ARG NCS_REVISION=v2.4.0 @@ -33,7 +34,7 @@ RUN set -x \ # nRF Connect SDK final image # ================================================== -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} # Tools for building, flashing and accessing device logs RUN set -x \ diff --git a/integrations/docker/images/stage-2/chip-build-nrf-platform/build.sh b/integrations/docker/images/stage-2/chip-build-nrf-platform/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-nrf-platform/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-nrf-platform/run.sh b/integrations/docker/images/stage-2/chip-build-nrf-platform/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-nrf-platform/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-nrf-platform/version b/integrations/docker/images/stage-2/chip-build-nrf-platform/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-nrf-platform/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-openiotsdk/Dockerfile b/integrations/docker/images/stage-2/chip-build-openiotsdk/Dockerfile similarity index 83% rename from integrations/docker/images/chip-build-openiotsdk/Dockerfile rename to integrations/docker/images/stage-2/chip-build-openiotsdk/Dockerfile index 2759f7e34c20e2..47e35df21c32df 100644 --- a/integrations/docker/images/chip-build-openiotsdk/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-openiotsdk/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} as build +FROM ghcr.io/project-chip/chip-build:${VERSION} as build +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ @@ -20,7 +21,8 @@ RUN set -x \ && rm -r FVP_Corstone_SSE-300_11.16_26.tgz FVP_Corstone_SSE-300.sh license_terms \ && : # last line -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip COPY --from=build /opt/FVP_Corstone_SSE-300/ /opt/FVP_Corstone_SSE-300/ diff --git a/integrations/docker/images/stage-2/chip-build-openiotsdk/build.sh b/integrations/docker/images/stage-2/chip-build-openiotsdk/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-openiotsdk/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-openiotsdk/run.sh b/integrations/docker/images/stage-2/chip-build-openiotsdk/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-openiotsdk/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-openiotsdk/version b/integrations/docker/images/stage-2/chip-build-openiotsdk/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-openiotsdk/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-telink/Dockerfile b/integrations/docker/images/stage-2/chip-build-telink/Dockerfile similarity index 91% rename from integrations/docker/images/chip-build-telink/Dockerfile rename to integrations/docker/images/stage-2/chip-build-telink/Dockerfile index c81581cd5b3066..567d735b52eb6c 100644 --- a/integrations/docker/images/chip-build-telink/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-telink/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} as build +FROM ghcr.io/project-chip/chip-build:${VERSION} as build +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ @@ -39,7 +40,8 @@ RUN set -x \ && west zephyr-export \ && : # last line -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip COPY --from=build /opt/telink/zephyr-sdk-0.16.1/ /opt/telink/zephyr-sdk-0.16.1/ COPY --from=build /opt/telink/zephyrproject/ /opt/telink/zephyrproject/ diff --git a/integrations/docker/images/stage-2/chip-build-telink/build.sh b/integrations/docker/images/stage-2/chip-build-telink/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-telink/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-telink/run.sh b/integrations/docker/images/stage-2/chip-build-telink/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-telink/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-telink/version b/integrations/docker/images/stage-2/chip-build-telink/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-telink/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-ti/Dockerfile b/integrations/docker/images/stage-2/chip-build-ti/Dockerfile similarity index 81% rename from integrations/docker/images/chip-build-ti/Dockerfile rename to integrations/docker/images/stage-2/chip-build-ti/Dockerfile index 649c8a4fc831b6..22be64824788e9 100644 --- a/integrations/docker/images/chip-build-ti/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-ti/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ diff --git a/integrations/docker/images/stage-2/chip-build-ti/build.sh b/integrations/docker/images/stage-2/chip-build-ti/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-ti/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-ti/run.sh b/integrations/docker/images/stage-2/chip-build-ti/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-ti/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-ti/version b/integrations/docker/images/stage-2/chip-build-ti/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-ti/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen/Dockerfile b/integrations/docker/images/stage-2/chip-build-tizen/Dockerfile similarity index 93% rename from integrations/docker/images/chip-build-tizen/Dockerfile rename to integrations/docker/images/stage-2/chip-build-tizen/Dockerfile index a81b034526ff70..ce276d2c73d610 100644 --- a/integrations/docker/images/chip-build-tizen/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-tizen/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # ------------------------------------------------------------------------------ # Add group/user for tizen diff --git a/integrations/docker/images/stage-2/chip-build-tizen/build.sh b/integrations/docker/images/stage-2/chip-build-tizen/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-tizen/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-tizen/run.sh b/integrations/docker/images/stage-2/chip-build-tizen/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-tizen/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh similarity index 100% rename from integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh rename to integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh diff --git a/integrations/docker/images/chip-build-tizen/tizen-sdk-installer/secret-tool.py b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/secret-tool.py similarity index 100% rename from integrations/docker/images/chip-build-tizen/tizen-sdk-installer/secret-tool.py rename to integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/secret-tool.py diff --git a/integrations/docker/images/stage-2/chip-build-tizen/version b/integrations/docker/images/stage-2/chip-build-tizen/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-tizen/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-android/Dockerfile b/integrations/docker/images/stage-3/chip-build-android/Dockerfile similarity index 95% rename from integrations/docker/images/chip-build-android/Dockerfile rename to integrations/docker/images/stage-3/chip-build-android/Dockerfile index 03229d1fa679d2..62c759aa5fab92 100644 --- a/integrations/docker/images/chip-build-android/Dockerfile +++ b/integrations/docker/images/stage-3/chip-build-android/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build-java:${VERSION} +FROM ghcr.io/project-chip/chip-build-java:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # JDK 8 access # JDK 8 is required because Android `sdkmanager` diff --git a/integrations/docker/images/stage-3/chip-build-android/build.sh b/integrations/docker/images/stage-3/chip-build-android/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-android/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-3/chip-build-android/run.sh b/integrations/docker/images/stage-3/chip-build-android/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-android/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-3/chip-build-android/version b/integrations/docker/images/stage-3/chip-build-android/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-android/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-esp32-qemu/Dockerfile b/integrations/docker/images/stage-3/chip-build-esp32-qemu/Dockerfile similarity index 84% rename from integrations/docker/images/chip-build-esp32-qemu/Dockerfile rename to integrations/docker/images/stage-3/chip-build-esp32-qemu/Dockerfile index 6e69acf7f72478..527f361956223b 100644 --- a/integrations/docker/images/chip-build-esp32-qemu/Dockerfile +++ b/integrations/docker/images/stage-3/chip-build-esp32-qemu/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build-esp32:${VERSION} +FROM ghcr.io/project-chip/chip-build-esp32:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ && apt-get update \ diff --git a/integrations/docker/images/stage-3/chip-build-esp32-qemu/build.sh b/integrations/docker/images/stage-3/chip-build-esp32-qemu/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-esp32-qemu/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-3/chip-build-esp32-qemu/run.sh b/integrations/docker/images/stage-3/chip-build-esp32-qemu/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-esp32-qemu/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-3/chip-build-esp32-qemu/version b/integrations/docker/images/stage-3/chip-build-esp32-qemu/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-esp32-qemu/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen-qemu/Dockerfile b/integrations/docker/images/stage-3/chip-build-tizen-qemu/Dockerfile similarity index 98% rename from integrations/docker/images/chip-build-tizen-qemu/Dockerfile rename to integrations/docker/images/stage-3/chip-build-tizen-qemu/Dockerfile index 78922ba8054ce4..625649d46fa9c1 100644 --- a/integrations/docker/images/chip-build-tizen-qemu/Dockerfile +++ b/integrations/docker/images/stage-3/chip-build-tizen-qemu/Dockerfile @@ -1,5 +1,6 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build-tizen:${VERSION} +FROM ghcr.io/project-chip/chip-build-tizen:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip ENV TIZEN_IOT_QEMU_KERNEL $TIZEN_SDK_ROOT/iot-qemu-virt-zImage ENV TIZEN_IOT_IMAGE_ROOT $TIZEN_SDK_ROOT/iot-rootfs.img diff --git a/integrations/docker/images/stage-3/chip-build-tizen-qemu/build.sh b/integrations/docker/images/stage-3/chip-build-tizen-qemu/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-tizen-qemu/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-tizen-qemu/files/0001-smack-add-permissive-mode.patch b/integrations/docker/images/stage-3/chip-build-tizen-qemu/files/0001-smack-add-permissive-mode.patch similarity index 100% rename from integrations/docker/images/chip-build-tizen-qemu/files/0001-smack-add-permissive-mode.patch rename to integrations/docker/images/stage-3/chip-build-tizen-qemu/files/0001-smack-add-permissive-mode.patch diff --git a/integrations/docker/images/stage-3/chip-build-tizen-qemu/run.sh b/integrations/docker/images/stage-3/chip-build-tizen-qemu/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-tizen-qemu/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-3/chip-build-tizen-qemu/version b/integrations/docker/images/stage-3/chip-build-tizen-qemu/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-3/chip-build-tizen-qemu/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile similarity index 75% rename from integrations/docker/images/chip-build-vscode/Dockerfile rename to integrations/docker/images/vscode/chip-build-vscode/Dockerfile index ddbfa8aac6d54b..35135ae238f87e 100644 --- a/integrations/docker/images/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile @@ -1,21 +1,24 @@ ARG VERSION=latest -FROM connectedhomeip/chip-build-nrf-platform:${VERSION} AS nrf -FROM connectedhomeip/chip-build-efr32:${VERSION} AS efr32 -FROM connectedhomeip/chip-build-android:${VERSION} AS android -FROM connectedhomeip/chip-build-esp32-qemu:${VERSION} as esp32 -FROM connectedhomeip/chip-build-mbed-os:${VERSION} AS mbedos -FROM connectedhomeip/chip-build-telink:${VERSION} AS telink -FROM connectedhomeip/chip-build-infineon:${VERSION} AS p6 -FROM connectedhomeip/chip-build-tizen:${VERSION} AS tizen -FROM connectedhomeip/chip-build-crosscompile:${VERSION} AS crosscompile -FROM connectedhomeip/chip-build-ameba:${VERSION} AS ameba -FROM connectedhomeip/chip-build-k32w:${VERSION} AS k32w -FROM connectedhomeip/chip-build-imx:${VERSION} AS imx -FROM connectedhomeip/chip-build-ti:${VERSION} AS ti -FROM connectedhomeip/chip-build-openiotsdk:${VERSION} AS openiotsdk -FROM connectedhomeip/chip-build-bouffalolab:${VERSION} AS bouffalolab -FROM connectedhomeip/chip-build-asr:${VERSION} AS asr -FROM connectedhomeip/chip-build:${VERSION} + +FROM ghcr.io/project-chip/chip-build-nrf-platform:${VERSION} AS nrf +FROM ghcr.io/project-chip/chip-build-efr32:${VERSION} AS efr32 +FROM ghcr.io/project-chip/chip-build-android:${VERSION} AS android +FROM ghcr.io/project-chip/chip-build-esp32-qemu:${VERSION} as esp32 +FROM ghcr.io/project-chip/chip-build-mbed-os:${VERSION} AS mbedos +FROM ghcr.io/project-chip/chip-build-telink:${VERSION} AS telink +FROM ghcr.io/project-chip/chip-build-infineon:${VERSION} AS p6 +FROM ghcr.io/project-chip/chip-build-tizen:${VERSION} AS tizen +FROM ghcr.io/project-chip/chip-build-crosscompile:${VERSION} AS crosscompile +FROM ghcr.io/project-chip/chip-build-ameba:${VERSION} AS ameba +FROM ghcr.io/project-chip/chip-build-k32w:${VERSION} AS k32w +FROM ghcr.io/project-chip/chip-build-imx:${VERSION} AS imx +FROM ghcr.io/project-chip/chip-build-ti:${VERSION} AS ti +FROM ghcr.io/project-chip/chip-build-openiotsdk:${VERSION} AS openiotsdk +FROM ghcr.io/project-chip/chip-build-bouffalolab:${VERSION} AS bouffalolab +FROM ghcr.io/project-chip/chip-build-asr:${VERSION} AS asr +FROM ghcr.io/project-chip/chip-build:${VERSION} + +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip # qemu-src copied over because qemu directory contains symlinks to the src # folder (notably pc-bios are required to run qemu) @@ -31,7 +34,8 @@ COPY --from=android /opt/android/sdk /opt/android/sdk COPY --from=android /opt/android/android-ndk-r23c /opt/android/android-ndk-r23c COPY --from=android /usr/lib/kotlinc /usr/lib/kotlinc -COPY --from=mbedos /opt/openocd/ /opt/openocd/ +# FIXME: OpenOCD was removed during the move to infineon's repo +# COPY --from=mbedos /opt/openocd/ /opt/openocd/ COPY --from=p6 /opt/ModusToolbox /opt/ModusToolbox diff --git a/integrations/docker/images/vscode/chip-build-vscode/build.sh b/integrations/docker/images/vscode/chip-build-vscode/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/vscode/chip-build-vscode/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/vscode/chip-build-vscode/run.sh b/integrations/docker/images/vscode/chip-build-vscode/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/vscode/chip-build-vscode/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/vscode/chip-build-vscode/version b/integrations/docker/images/vscode/chip-build-vscode/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/vscode/chip-build-vscode/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/run.sh b/integrations/docker/run.sh index ae24ccef8610bc..922bcd4633061f 100755 --- a/integrations/docker/run.sh +++ b/integrations/docker/run.sh @@ -29,7 +29,9 @@ die() { exit 1 } -ORG=${DOCKER_RUN_ORG:-connectedhomeip} +ORG=${DOCKER_RUN_ORG:-project-chip} + +GHCR_ORG="ghcr.io" # directory name is IMAGE=${DOCKER_RUN_IMAGE:-$(basename "$here")} @@ -42,7 +44,7 @@ VERSION=${DOCKER_RUN_VERSION:-$(sed 's/ .*//' "$here/version")} || DOCKER_RUN_VERSION" # full image name -FULL_IMAGE_NAME="$ORG/$IMAGE${VERSION:+:${VERSION}}" +FULL_IMAGE_NAME="$GHCR_ORG/$ORG/$IMAGE${VERSION:+:${VERSION}}" # where RUN_DIR=${DOCKER_RUN_DIR:-$(pwd)} diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index b444a8652e1599..a0024bf5b18946 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -603,6 +603,7 @@ def BuildBouffalolabTarget(): target.AppendModifier('115200', baudrate=115200) target.AppendModifier('rpc', enable_rpcs=True) target.AppendModifier('cdc', enable_cdc=True) + target.AppendModifier('rotating_device_id', enable_rotating_device_id=True) return target @@ -654,6 +655,7 @@ def BuildTelinkTarget(): TargetPart('ota-requestor', app=TelinkApp.OTA_REQUESTOR), TargetPart('pump', app=TelinkApp.PUMP), TargetPart('pump-controller', app=TelinkApp.PUMP_CONTROLLER), + TargetPart('smoke-co-alarm', app=TelinkApp.SMOKE_CO_ALARM), TargetPart('temperature-measurement', app=TelinkApp.TEMPERATURE_MEASUREMENT), TargetPart('thermostat', app=TelinkApp.THERMOSTAT), diff --git a/scripts/build/builders/bouffalolab.py b/scripts/build/builders/bouffalolab.py index 52477be7519ebf..8281ba99e8ca89 100644 --- a/scripts/build/builders/bouffalolab.py +++ b/scripts/build/builders/bouffalolab.py @@ -80,7 +80,8 @@ def __init__(self, module_type: str = "BL706C-22", baudrate=2000000, enable_shell: bool = False, - enable_cdc: bool = False + enable_cdc: bool = False, + enable_rotating_device_id: bool = False ): if 'BL602' == module_type: @@ -125,6 +126,10 @@ def __init__(self, elif enable_shell: self.argsOpt.append('chip_build_libshell=true') + if enable_rotating_device_id: + self.argsOpt.append('chip_enable_additional_data_advertising=true') + self.argsOpt.append('chip_enable_rotating_device_id=true') + try: self.argsOpt.append('bouffalolab_sdk_root="%s"' % os.environ['BOUFFALOLAB_SDK_ROOT']) except KeyError as err: diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py index 66ce71623487c1..d29a1cfce8ee6f 100644 --- a/scripts/build/builders/telink.py +++ b/scripts/build/builders/telink.py @@ -31,6 +31,7 @@ class TelinkApp(Enum): OTA_REQUESTOR = auto() PUMP = auto() PUMP_CONTROLLER = auto() + SMOKE_CO_ALARM = auto() TEMPERATURE_MEASUREMENT = auto() THERMOSTAT = auto() WINDOW_COVERING = auto() @@ -56,6 +57,8 @@ def ExampleName(self): return 'pump-app' elif self == TelinkApp.PUMP_CONTROLLER: return 'pump-controller-app' + elif self == TelinkApp.SMOKE_CO_ALARM: + return 'smoke-co-alarm-app' elif self == TelinkApp.TEMPERATURE_MEASUREMENT: return 'temperature-measurement-app' elif self == TelinkApp.THERMOSTAT: @@ -86,6 +89,8 @@ def AppNamePrefix(self): return 'chip-telink-pump-example' elif self == TelinkApp.PUMP_CONTROLLER: return 'chip-telink-pump-controller-example' + elif self == TelinkApp.SMOKE_CO_ALARM: + return 'chip-telink-smoke-co-alarm-example' elif self == TelinkApp.TEMPERATURE_MEASUREMENT: return 'chip-telink-temperature-measurement-example' elif self == TelinkApp.THERMOSTAT: diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index f6c21f3b393ee0..00df21821af696 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -1,7 +1,7 @@ ameba-amebad-{all-clusters,all-clusters-minimal,light,light-switch,pigweed} asr-{asr582x,asr595x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor}[-ota][-shell][-no_logging][-factory][-rotating_id] android-{arm,arm64,x86,x64,androidstudio-arm,androidstudio-arm64,androidstudio-x86,androidstudio-x64}-{chip-tool,chip-test,tv-server,tv-casting-app,java-matter-controller}[-no-debug] -bouffalolab-{bl602-iot-matter-v1,bl602-iot-dvk-3s,bl602-night-light,xt-zb6-devkit,bl706-iot-dvk,bl706-night-light,bl704l-dvk}-light[-shell][-115200][-rpc][-cdc] +bouffalolab-{bl602-iot-matter-v1,bl602-iot-dvk-3s,bl602-night-light,xt-zb6-devkit,bl706-iot-dvk,bl706-night-light,bl704l-dvk}-light[-shell][-115200][-rpc][-cdc][-rotating_device_id] cc32xx-lock ti-cc13x2x7_26x2x7-{lighting,lock,pump,pump-controller}[-mtd] ti-cc13x4_26x4-{all-clusters,lighting,lock,pump,pump-controller}[-mtd][-ftd] @@ -21,5 +21,5 @@ nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,loc nrf-native-posix-64-tests qpg-qpg6105-{lock,light,shell,persistent-storage} tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan] -telink-tlsr9518adk80d-{all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,temperature-measurement,thermostat,window-covering}[-shell][-rpc][-factory-data] +telink-tlsr9518adk80d-{all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-shell][-rpc][-factory-data] openiotsdk-{shell,lock}[-mbedtls][-psa] diff --git a/scripts/helpers/roll_docker_version.sh b/scripts/helpers/roll_docker_version.sh new file mode 100755 index 00000000000000..6d36981a46ab41 --- /dev/null +++ b/scripts/helpers/roll_docker_version.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +CURRENT_VERSION=$(sed 's/ .*//' ./integrations/docker/images/base/chip-build/version) + +echo "Current version: $CURRENT_VERSION" + +NEXT_VERSION=$((CURRENT_VERSION + 1)) + +echo "Next version: $NEXT_VERSION" + +echo "Rolling workflows" +sed -r -i "s|image: ghcr\.io/project-chip/(.*):[0-9]*(\..*)?|image: ghcr.io/project-chip/\1:$NEXT_VERSION|" .github/workflows/*.yaml + +echo "Rolling VSCode container" +sed -r -i "s|matter-dev-environment:local --version [0-9]*|matter-dev-environment:local --version $NEXT_VERSION|" .devcontainer/devcontainer.json + +echo "Rolling docker images" +sed -r -i "s|ARG VERSION=[0-9]*|ARG VERSION=$NEXT_VERSION|" integrations/docker/images/*/*/Dockerfile + +echo "Rolling main docker version" +echo "$NEXT_VERSION" >./integrations/docker/images/base/chip-build/version + +echo "Done" diff --git a/scripts/py_matter_yamltests/matter_yamltests/errors.py b/scripts/py_matter_yamltests/matter_yamltests/errors.py index b6205dad9efabb..e38cc3a4875ff1 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/errors.py +++ b/scripts/py_matter_yamltests/matter_yamltests/errors.py @@ -133,6 +133,17 @@ def __init__(self, content): self.tag_key_with_error(content, 'response') +class TestStepGroupEndPointError(TestStepError): + """Raise when a test step targeting a group of nodes targets an endpoint.""" + + def __init__(self, content): + message = 'Group command should not target an endpoint' + super().__init__(message) + + self.tag_key_with_error(content, 'groupId') + self.tag_key_with_error(content, 'endpoint') + + class TestStepVerificationStandaloneError(TestStepError): """Raise when a test step with a verification key is enabled and not interactive.""" diff --git a/scripts/py_matter_yamltests/matter_yamltests/parser.py b/scripts/py_matter_yamltests/matter_yamltests/parser.py index ed99851b735e34..82b798a85156a4 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/parser.py +++ b/scripts/py_matter_yamltests/matter_yamltests/parser.py @@ -201,6 +201,7 @@ def __init__(self, test: dict, config: dict, definitions: SpecDefinitions, pics_ self.max_interval = _value_or_none(test, 'maxInterval') self.timed_interaction_timeout_ms = _value_or_none( test, 'timedInteractionTimeoutMs') + self.timeout = _value_or_none(test, 'timeout') self.data_version = _value_or_none( test, 'dataVersion') self.busy_wait_ms = _value_or_none(test, 'busyWaitMs') @@ -661,6 +662,10 @@ def max_interval(self): def timed_interaction_timeout_ms(self): return self._test.timed_interaction_timeout_ms + @property + def timeout(self): + return self._test.timeout + @property def data_version(self): return self._test.data_version diff --git a/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py b/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py index ae434e68b08fda..6dabfdd164ee1a 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py +++ b/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py @@ -15,8 +15,8 @@ from typing import Tuple, Union -from .errors import (TestStepError, TestStepGroupResponseError, TestStepInvalidTypeError, TestStepKeyError, - TestStepNodeIdAndGroupIdError, TestStepResponseVariableError, TestStepValueAndValuesError, +from .errors import (TestStepError, TestStepGroupEndPointError, TestStepGroupResponseError, TestStepInvalidTypeError, + TestStepKeyError, TestStepNodeIdAndGroupIdError, TestStepResponseVariableError, TestStepValueAndValuesError, TestStepVerificationStandaloneError, TestStepWaitResponseError) from .fixes import add_yaml_support_for_scientific_notation_without_dot @@ -105,6 +105,7 @@ def __check_test_step(self, config: dict, content): 'response': (dict, list, str), # Can be a variable 'minInterval': int, 'maxInterval': int, + 'timeout': int, 'timedInteractionTimeoutMs': int, 'dataVersion': (list, int, str), # Can be a variable 'busyWaitMs': int, @@ -114,6 +115,7 @@ def __check_test_step(self, config: dict, content): self.__check(content, schema) self.__rule_node_id_and_group_id_are_mutually_exclusive(content) self.__rule_group_step_should_not_expect_a_response(content) + self.__rule_group_step_should_not_target_an_endpoint(content) self.__rule_step_with_verification_should_be_disabled_or_interactive( content) self.__rule_wait_should_not_expect_a_response(content) @@ -232,9 +234,11 @@ def __rule_node_id_and_group_id_are_mutually_exclusive(self, content): def __rule_group_step_should_not_expect_a_response(self, content): if 'groupId' in content and 'response' in content: - response = content.get('response') - if 'value' in response or 'values' in response: - raise TestStepGroupResponseError(content) + raise TestStepGroupResponseError(content) + + def __rule_group_step_should_not_target_an_endpoint(self, content): + if 'groupId' in content and 'endpoint' in content: + raise TestStepGroupEndPointError(content) def __rule_step_with_verification_should_be_disabled_or_interactive(self, content): if 'verification' in content: diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index 5e4a67ef55944a..60de80bd19e9f1 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -66,6 +66,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement load "../src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/scene.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml"; @@ -121,7 +122,7 @@ endpoint 0 { // reject server cluster Scenes; // reject server cluster Groups; - // Required only if !CustomNetworkConfig. + // Required only if !CustomNetworkConfig. // require server cluster NetworkCommissioning; // If Ethernet diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 5bbd9265e93f0d..5573d0bc48221f 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --output-file=constraints.txt --resolver=backtracking --strip-extras requirements.all.txt +# pip-compile --allow-unsafe --output-file=constraints.txt --resolver=backtracking --strip-extras requirements.all.txt # anytree==2.8.0 # via -r requirements.memory.txt @@ -199,7 +199,7 @@ pgi==0.0.11.2 ; sys_platform == "linux" # via -r requirements.all.txt pickleshare==0.7.5 # via ipython -pip-tools==6.14.0 +pip-tools==7.0.0 # via -r requirements.all.txt platformdirs==3.0.0 # via virtualenv @@ -379,5 +379,12 @@ wheel==0.38.4 ; sys_platform == "linux" # pip-tools # The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools +pip==23.2 + # via + # fastcore + # ghapi + # pip-tools +setuptools==68.0.0 + # via + # pip-tools + # west diff --git a/scripts/setup/requirements.all.txt b/scripts/setup/requirements.all.txt index 9e4c7a16e2090b..378959cce0f17e 100644 --- a/scripts/setup/requirements.all.txt +++ b/scripts/setup/requirements.all.txt @@ -1,4 +1,4 @@ -pip-tools>=6.13.0 +pip-tools>=7.0.0 virtualenv # core build requirements diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt index 591b2242a68463..f688b17b1a521b 100644 --- a/scripts/setup/requirements.esp32.txt +++ b/scripts/setup/requirements.esp32.txt @@ -10,4 +10,9 @@ kconfiglib==13.7.1 construct==2.10.54 python-socketio<5 itsdangerous<2.1 ; python_version < "3.11" -gdbgui==0.13.2.0 ; python_version < "3.11" and platform_machine != 'aarch64' and sys_platform == 'linux' +# +# gdbgui pulls in gevent which fails to compile due to cython updates. +# Could not find a good way to fix this dependency, so commenting it +# out here. +# +# gdbgui==0.13.2.0 ; python_version < "3.11" and platform_machine != 'aarch64' and sys_platform == 'linux' diff --git a/scripts/tests/cirque_tests.sh b/scripts/tests/cirque_tests.sh index 87e6c1e3475787..4796ecd2bffbd5 100755 --- a/scripts/tests/cirque_tests.sh +++ b/scripts/tests/cirque_tests.sh @@ -99,7 +99,7 @@ function __cirquetest_self_hash() { } function cirquetest_cachekey() { - echo "$("$REPO_DIR"/integrations/docker/ci-only-images/chip-cirque-device-base/cachekey.sh).openthread.$OPENTHREAD_CHECKOUT.cirque_test.$(__cirquetest_self_hash)" + echo "$("$REPO_DIR"/integrations/docker/images/stage-2/chip-cirque-device-base/cachekey.sh).openthread.$OPENTHREAD_CHECKOUT.cirque_test.$(__cirquetest_self_hash)" } function cirquetest_cachekeyhash() { @@ -116,12 +116,9 @@ function cirquetest_bootstrap() { make NO_GRPC=1 install -j - if [[ "$GITHUB_ACTION_RUN" = "1" ]]; then - # Note: This script will be invoked in docker on CI, We should add CHIP repo to safe directory to silent git error messages. - git config --global --add safe.directory /home/runner/work/connectedhomeip/connectedhomeip - fi + git config --global --add safe.directory /home/runner/work/connectedhomeip/connectedhomeip - "$REPO_DIR"/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh + "$REPO_DIR"/integrations/docker/images/stage-2/chip-cirque-device-base/build.sh __cirquetest_build_ot_lazy pip3 install -r requirements_nogrpc.txt diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 8211d22bf707b7..7f2c4d82280392 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -193,6 +193,9 @@ static_library("app") { "WriteHandler.cpp", "reporting/Engine.cpp", "reporting/Engine.h", + "reporting/ReportScheduler.h", + "reporting/ReportSchedulerImpl.cpp", + "reporting/ReportSchedulerImpl.h", "reporting/reporting.h", ] diff --git a/src/app/CommandSender.cpp b/src/app/CommandSender.cpp index 5282f10daf39a0..5daceaf05a088a 100644 --- a/src/app/CommandSender.cpp +++ b/src/app/CommandSender.cpp @@ -32,9 +32,10 @@ namespace chip { namespace app { -CommandSender::CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest) : - mExchangeCtx(*this), mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(false), - mTimedRequest(aIsTimedRequest) +CommandSender::CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest, + bool aSuppressResponse) : + mExchangeCtx(*this), + mpCallback(apCallback), mpExchangeMgr(apExchangeMgr), mSuppressResponse(aSuppressResponse), mTimedRequest(aIsTimedRequest) {} CHIP_ERROR CommandSender::AllocateBuffer() @@ -61,7 +62,7 @@ CHIP_ERROR CommandSender::AllocateBuffer() return CHIP_NO_ERROR; } -CHIP_ERROR CommandSender::SendCommandRequest(const SessionHandle & session, Optional timeout) +CHIP_ERROR CommandSender::SendCommandRequestInternal(const SessionHandle & session, Optional timeout) { VerifyOrReturnError(mState == State::AddedCommand, CHIP_ERROR_INCORRECT_STATE); @@ -76,15 +77,6 @@ CHIP_ERROR CommandSender::SendCommandRequest(const SessionHandle & session, Opti mExchangeCtx->SetResponseTimeout(timeout.ValueOr(session->ComputeRoundTripTimeout(app::kExpectedIMProcessingTime))); - if (mTimedRequest != mTimedInvokeTimeoutMs.HasValue()) - { - ChipLogError( - DataManagement, - "Inconsistent timed request state in CommandSender: mTimedRequest (%d) != mTimedInvokeTimeoutMs.HasValue() (%d)", - mTimedRequest, mTimedInvokeTimeoutMs.HasValue()); - return CHIP_ERROR_INCORRECT_STATE; - } - if (mTimedInvokeTimeoutMs.HasValue()) { ReturnErrorOnFailure(TimedRequest::Send(mExchangeCtx.Get(), mTimedInvokeTimeoutMs.Value())); @@ -95,6 +87,29 @@ CHIP_ERROR CommandSender::SendCommandRequest(const SessionHandle & session, Opti return SendInvokeRequest(); } +#if CONFIG_BUILD_FOR_HOST_UNIT_TEST +CHIP_ERROR CommandSender::TestOnlyCommandSenderTimedRequestFlagWithNoTimedInvoke(const SessionHandle & session, + Optional timeout) +{ + VerifyOrReturnError(mTimedRequest, CHIP_ERROR_INCORRECT_STATE); + return SendCommandRequestInternal(session, timeout); +} +#endif + +CHIP_ERROR CommandSender::SendCommandRequest(const SessionHandle & session, Optional timeout) +{ + + if (mTimedRequest != mTimedInvokeTimeoutMs.HasValue()) + { + ChipLogError( + DataManagement, + "Inconsistent timed request state in CommandSender: mTimedRequest (%d) != mTimedInvokeTimeoutMs.HasValue() (%d)", + mTimedRequest, mTimedInvokeTimeoutMs.HasValue()); + return CHIP_ERROR_INCORRECT_STATE; + } + return SendCommandRequestInternal(session, timeout); +} + CHIP_ERROR CommandSender::SendGroupCommandRequest(const SessionHandle & session) { VerifyOrReturnError(mState == State::AddedCommand, CHIP_ERROR_INCORRECT_STATE); diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index c61043c6b33265..6da9b053856c82 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -121,7 +121,8 @@ class CommandSender final : public Messaging::ExchangeDelegate * If used in a groups setting, callbacks do not need to be passed. * If callbacks are passed the only one that will be called in a group sesttings is the onDone */ - CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest = false); + CommandSender(Callback * apCallback, Messaging::ExchangeManager * apExchangeMgr, bool aIsTimedRequest = false, + bool aSuppressResponse = false); CHIP_ERROR PrepareCommand(const CommandPathParams & aCommandPathParams, bool aStartDataStruct = true); CHIP_ERROR FinishCommand(bool aEndDataStruct = true); TLV::TLVWriter * GetCommandDataIBTLVWriter(); @@ -164,11 +165,18 @@ class CommandSender final : public Messaging::ExchangeDelegate */ template CHIP_ERROR AddRequestDataNoTimedCheck(const CommandPathParams & aCommandPath, const CommandDataT & aData, - const Optional & aTimedInvokeTimeoutMs, bool aSuppressResponse = false) + const Optional & aTimedInvokeTimeoutMs) { - mSuppressResponse = aSuppressResponse; return AddRequestDataInternal(aCommandPath, aData, aTimedInvokeTimeoutMs); } + + /** + * Version of SendCommandRequest that sets the TimedRequest flag but does not send the TimedInvoke + * action. For use in tests only. + */ + CHIP_ERROR TestOnlyCommandSenderTimedRequestFlagWithNoTimedInvoke(const SessionHandle & session, + Optional timeout = NullOptional); + #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST private: @@ -265,6 +273,8 @@ class CommandSender final : public Messaging::ExchangeDelegate CHIP_ERROR Finalize(System::PacketBufferHandle & commandPacket); + CHIP_ERROR SendCommandRequestInternal(const SessionHandle & session, Optional timeout); + Messaging::ExchangeHolder mExchangeCtx; Callback * mpCallback = nullptr; Messaging::ExchangeManager * mpExchangeMgr = nullptr; diff --git a/src/app/OperationalSessionSetup.cpp b/src/app/OperationalSessionSetup.cpp index 849490b40ab8c8..7b5d70919f2a8a 100644 --- a/src/app/OperationalSessionSetup.cpp +++ b/src/app/OperationalSessionSetup.cpp @@ -276,7 +276,7 @@ void OperationalSessionSetup::EnqueueConnectionCallbacks(Callback::Callback optionalSessionHandle = mSecureSession.Get(); + ScopedNodeId peerId = mPeerId; + + if (releaseBehavior == ReleaseBehavior::Release) + { + VerifyOrDie(mReleaseDelegate != nullptr); + mReleaseDelegate->ReleaseSession(this); + } + + // DO NOT touch any members of this object after this point. It's dead. + + NotifyConnectionCallbacks(failureReady, successReady, error, peerId, performingAddressUpdate, exchangeMgr, + optionalSessionHandle); +} + +void OperationalSessionSetup::NotifyConnectionCallbacks(Cancelable & failureReady, Cancelable & successReady, CHIP_ERROR error, + const ScopedNodeId & peerId, bool performingAddressUpdate, + Messaging::ExchangeManager * exchangeMgr, + const Optional & optionalSessionHandle) +{ // // If we encountered no error, go ahead and call all success callbacks. Otherwise, // call the failure callbacks. @@ -304,7 +327,7 @@ void OperationalSessionSetup::DequeueConnectionCallbacksWithoutReleasing(CHIP_ER while (failureReady.mNext != &failureReady) { // We expect that we only have callbacks if we are not performing just address update. - VerifyOrDie(!mPerformingAddressUpdate); + VerifyOrDie(!performingAddressUpdate); Callback::Callback * cb = Callback::Callback::FromCancelable(failureReady.mNext); @@ -312,35 +335,26 @@ void OperationalSessionSetup::DequeueConnectionCallbacksWithoutReleasing(CHIP_ER if (error != CHIP_NO_ERROR) { - cb->mCall(cb->mContext, mPeerId, error); + cb->mCall(cb->mContext, peerId, error); } } while (successReady.mNext != &successReady) { // We expect that we only have callbacks if we are not performing just address update. - VerifyOrDie(!mPerformingAddressUpdate); + VerifyOrDie(!performingAddressUpdate); Callback::Callback * cb = Callback::Callback::FromCancelable(successReady.mNext); cb->Cancel(); if (error == CHIP_NO_ERROR) { - auto * exchangeMgr = mInitParams.exchangeMgr; VerifyOrDie(exchangeMgr); // We know that we for sure have the SessionHandle in the successful case. - auto optionalSessionHandle = mSecureSession.Get(); cb->mCall(cb->mContext, *exchangeMgr, optionalSessionHandle.Value()); } } } -void OperationalSessionSetup::DequeueConnectionCallbacks(CHIP_ERROR error) -{ - DequeueConnectionCallbacksWithoutReleasing(error); - VerifyOrDie(mReleaseDelegate != nullptr); - mReleaseDelegate->ReleaseSession(this); -} - void OperationalSessionSetup::OnSessionEstablishmentError(CHIP_ERROR error) { VerifyOrReturn(mState == State::Connecting, @@ -447,7 +461,7 @@ OperationalSessionSetup::~OperationalSessionSetup() CancelSessionSetupReattempt(); #endif // CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES - DequeueConnectionCallbacksWithoutReleasing(CHIP_ERROR_CANCELLED); + DequeueConnectionCallbacks(CHIP_ERROR_CANCELLED, ReleaseBehavior::DoNotRelease); } CHIP_ERROR OperationalSessionSetup::LookupPeerAddress() diff --git a/src/app/OperationalSessionSetup.h b/src/app/OperationalSessionSetup.h index c6208a00f4ba35..bfa76fbc41d730 100644 --- a/src/app/OperationalSessionSetup.h +++ b/src/app/OperationalSessionSetup.h @@ -301,6 +301,12 @@ class DLL_EXPORT OperationalSessionSetup : public SessionEstablishmentDelegate, void EnqueueConnectionCallbacks(Callback::Callback * onConnection, Callback::Callback * onFailure); + enum class ReleaseBehavior + { + Release, + DoNotRelease + }; + /* * This dequeues all failure and success callbacks and appropriately * invokes either set depending on the value of error. @@ -308,17 +314,23 @@ class DLL_EXPORT OperationalSessionSetup : public SessionEstablishmentDelegate, * If error == CHIP_NO_ERROR, only success callbacks are invoked. * Otherwise, only failure callbacks are invoked. * - * This uses mReleaseDelegate to release ourselves (aka `this`). As a - * result any caller should return right away without touching `this`. + * If releaseBehavior is Release, this uses mReleaseDelegate to release + * ourselves (aka `this`). As a result any caller should return right away + * without touching `this`. * + * Setting releaseBehavior to DoNotRelease is meant for use from the destructor */ - void DequeueConnectionCallbacks(CHIP_ERROR error); + void DequeueConnectionCallbacks(CHIP_ERROR error, ReleaseBehavior releaseBehavior = ReleaseBehavior::Release); - /* - * Like DequeueConnectionCallbacks but does not release ourselves. For use - * from our destructor. + /** + * Helper for DequeueConnectionCallbacks that handles the actual callback + * notifications. This happens after the object has been released, if it's + * being released. */ - void DequeueConnectionCallbacksWithoutReleasing(CHIP_ERROR error); + static void NotifyConnectionCallbacks(Callback::Cancelable & failureReady, Callback::Cancelable & successReady, + CHIP_ERROR error, const ScopedNodeId & peerId, bool performingAddressUpdate, + Messaging::ExchangeManager * exchangeMgr, + const Optional & optionalSessionHandle); /** * Triggers a DNSSD lookup to find a usable peer address. diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 21eb83f65ad584..fdeac7ed454518 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -940,6 +940,19 @@ CHIP_ERROR ReadClient::SendAutoResubscribeRequest(ReadPrepareParams && aReadPrep return err; } +CHIP_ERROR ReadClient::SendAutoResubscribeRequest(const ScopedNodeId & aPublisherId, ReadPrepareParams && aReadPrepareParams) +{ + mPeer = aPublisherId; + mReadPrepareParams = std::move(aReadPrepareParams); + CHIP_ERROR err = EstablishSessionToPeer(); + if (err != CHIP_NO_ERROR) + { + // Make sure we call our callback's OnDeallocatePaths. + StopResubscription(); + } + return err; +} + CHIP_ERROR ReadClient::SendSubscribeRequest(const ReadPrepareParams & aReadPrepareParams) { VerifyOrReturnError(aReadPrepareParams.mMinIntervalFloorSeconds <= aReadPrepareParams.mMaxIntervalCeilingSeconds, @@ -1118,12 +1131,8 @@ void ReadClient::OnResubscribeTimerCallback(System::Layer * /* If this starts be { // We don't have an active CASE session. We need to go ahead and set // one up, if we can. - ChipLogProgress(DataManagement, "Trying to establish a CASE session"); - auto * caseSessionManager = InteractionModelEngine::GetInstance()->GetCASESessionManager(); - if (caseSessionManager) + if (_this->EstablishSessionToPeer() == CHIP_NO_ERROR) { - caseSessionManager->FindOrEstablishSession(_this->mPeer, &_this->mOnConnectedCallback, - &_this->mOnConnectionFailureCallback); return; } @@ -1209,5 +1218,14 @@ Optional ReadClient::GetSubscriptionTimeout() return MakeOptional(timeout); } +CHIP_ERROR ReadClient::EstablishSessionToPeer() +{ + ChipLogProgress(DataManagement, "Trying to establish a CASE session for subscription"); + auto * caseSessionManager = InteractionModelEngine::GetInstance()->GetCASESessionManager(); + VerifyOrReturnError(caseSessionManager != nullptr, CHIP_ERROR_INCORRECT_STATE); + caseSessionManager->FindOrEstablishSession(mPeer, &mOnConnectedCallback, &mOnConnectionFailureCallback); + return CHIP_NO_ERROR; +} + } // namespace app } // namespace chip diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index f45b8b1448cc2e..0951b0bec1cc0e 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -352,12 +352,22 @@ class ReadClient : public Messaging::ExchangeDelegate * OnDeallocatePaths. Note: At a given time in the system, you can either have a single subscription with re-sub enabled that * has mKeepSubscriptions = false, OR, multiple subs with re-sub enabled with mKeepSubscriptions = true. You shall not * have a mix of both simultaneously. If SendAutoResubscribeRequest is called at all, it guarantees that it will call - * OnDeallocatePaths when OnDone is called. SendAutoResubscribeRequest is the only case that calls OnDeallocatePaths, since - * that's the only case when the consumer moved a ReadParams into the client. + * OnDeallocatePaths (either befor returning error, or when OnDone is called). SendAutoResubscribeRequest is the only case + * that calls OnDeallocatePaths, since that's the only case when the consumer moved a ReadParams into the client. * */ CHIP_ERROR SendAutoResubscribeRequest(ReadPrepareParams && aReadPrepareParams); + /** + * Like SendAutoResubscribeRequest above, but without a session being + * available in the ReadPrepareParams. When this is used, the ReadClient is + * responsible for setting up the CASE session itself. + * + * When using this version of SendAutoResubscribeRequest, any session to + * which ReadPrepareParams has a reference will be ignored. + */ + CHIP_ERROR SendAutoResubscribeRequest(const ScopedNodeId & aPublisherId, ReadPrepareParams && aReadPrepareParams); + /** * This provides a standard re-subscription policy implementation that given a termination cause, does the following: * - Calculates the time till next subscription with fibonacci back-off (implemented by ComputeTimeTillNextSubscription()). @@ -538,6 +548,13 @@ class ReadClient : public Messaging::ExchangeDelegate CHIP_ERROR GetMinEventNumber(const ReadPrepareParams & aReadPrepareParams, Optional & aEventMin); + /** + * Start setting up a CASE session to our peer, if we can locate a + * CASESessionManager. Returns error if we did not even manage to kick off + * a CASE attempt. + */ + CHIP_ERROR EstablishSessionToPeer(); + Messaging::ExchangeManager * mpExchangeMgr = nullptr; Messaging::ExchangeHolder mExchange; Callback & mpCallback; diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 4a92fcfac91f9c..a5209ae45d588e 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -39,7 +39,7 @@ namespace app { using Status = Protocols::InteractionModel::Status; ReadHandler::ReadHandler(ManagementCallback & apCallback, Messaging::ExchangeContext * apExchangeContext, - InteractionType aInteractionType) : + InteractionType aInteractionType, Observer * observer) : mExchangeCtx(*this), mManagementCallback(apCallback) #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS @@ -63,15 +63,37 @@ ReadHandler::ReadHandler(ManagementCallback & apCallback, Messaging::ExchangeCon SetStateFlag(ReadHandlerFlags::PrimingReports); mSessionHandle.Grab(mExchangeCtx->GetSessionHandle()); + +// TODO (#27672): Uncomment when the ReportScheduler is implemented +#if 0 + if (nullptr != observer) + { + if (CHIP_NO_ERROR == SetObserver(observer)) + { + mObserver->OnReadHandlerCreated(this); + } + } +#endif } #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS -ReadHandler::ReadHandler(ManagementCallback & apCallback) : +ReadHandler::ReadHandler(ManagementCallback & apCallback, Observer * observer) : mExchangeCtx(*this), mManagementCallback(apCallback), mOnConnectedCallback(HandleDeviceConnected, this), mOnConnectionFailureCallback(HandleDeviceConnectionFailure, this) { mInteractionType = InteractionType::Subscribe; mFlags.ClearAll(); + +// TODO (#27672): Uncomment when the ReportScheduler is implemented +#if 0 + if (nullptr != observer) + { + if (CHIP_NO_ERROR == SetObserver(observer)) + { + mObserver->OnReadHandlerCreated(this); + } + } +#endif } void ReadHandler::ResumeSubscription(CASESessionManager & caseSessionManager, @@ -115,6 +137,13 @@ void ReadHandler::ResumeSubscription(CASESessionManager & caseSessionManager, ReadHandler::~ReadHandler() { + // TODO (#27672): Enable when the ReportScheduler is implemented and move in Close() after testing +#if 0 + if (nullptr != mObserver) + { + mObserver->OnReadHandlerDestroyed(this); + } +#endif auto * appCallback = mManagementCallback.GetAppCallback(); if (mFlags.Has(ReadHandlerFlags::ActiveSubscription) && appCallback) { @@ -319,6 +348,15 @@ CHIP_ERROR ReadHandler::SendReportData(System::PacketBufferHandle && aPayload, b if (IsType(InteractionType::Subscribe) && !IsPriming()) { +// TODO (#27672): Enable when the ReportScheduler is implemented and remove call to UpdateReportTimer, will be handled by +// the report Scheduler +#if 0 + if (nullptr != mObserver) + { + mObserver->OnSubscriptionAction(this); + } +#endif + // Ignore the error from UpdateReportTimer. If we've // successfully sent the message, we need to return success from // this method. @@ -593,6 +631,13 @@ void ReadHandler::MoveToState(const HandlerState aTargetState) // if (aTargetState == HandlerState::GeneratingReports && IsReportableNow()) { +// TODO (#27672): Enable when the ReportScheduler is implemented and remove the call to ScheduleRun() +#if 0 + if(nullptr != mObserver) + { + mObserver->OnBecameReportable(this); + } +#endif InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); } } @@ -634,6 +679,14 @@ CHIP_ERROR ReadHandler::SendSubscribeResponse() ReturnErrorOnFailure(writer.Finalize(&packet)); VerifyOrReturnLogError(mExchangeCtx, CHIP_ERROR_INCORRECT_STATE); + // TODO (#27672): Uncomment when the ReportScheduler is implemented and remove call to UpdateReportTimer, handled by + // the report Scheduler +#if 0 + if (nullptr != mObserver) + { + mObserver->OnSubscriptionAction(this); + } +#endif ReturnErrorOnFailure(UpdateReportTimer()); ClearStateFlag(ReadHandlerFlags::PrimingReports); @@ -753,6 +806,7 @@ void ReadHandler::PersistSubscription() } } +// TODO (#27672): Remove when ReportScheduler is enabled as timing will now be handled by the ReportScheduler void ReadHandler::MinIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState) { VerifyOrReturn(apAppState != nullptr); @@ -764,6 +818,7 @@ void ReadHandler::MinIntervalExpiredCallback(System::Layer * apSystemLayer, void readHandler); } +// TODO (#27672): Remove when ReportScheduler is enabled as timing will now be handled by the ReportScheduler void ReadHandler::MaxIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState) { VerifyOrReturn(apAppState != nullptr); @@ -773,6 +828,7 @@ void ReadHandler::MaxIntervalExpiredCallback(System::Layer * apSystemLayer, void readHandler->mMaxInterval - readHandler->mMinIntervalFloorSeconds); } +// TODO (#27672): Remove when ReportScheduler is enabled as timing will now be handled by the ReportScheduler CHIP_ERROR ReadHandler::UpdateReportTimer() { InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer( @@ -812,7 +868,7 @@ void ReadHandler::AttributePathIsDirty(const AttributePathParams & aAttributeCha // Here we just reset the iterator to the beginning of the current cluster, if the dirty path affects it. // This will ensure the reports are consistent within a single cluster generated from a single path in the request. - // TODO (#16699): Currently we can only gurentee the reports generated from a single path in the request are consistent. The + // TODO (#16699): Currently we can only guarantee the reports generated from a single path in the request are consistent. The // data might be inconsistent if the user send a request with two paths from the same cluster. We need to clearify the behavior // or make it consistent. if (mAttributePathExpandIterator.Get(path) && @@ -831,6 +887,13 @@ void ReadHandler::AttributePathIsDirty(const AttributePathParams & aAttributeCha if (IsReportableNow()) { + // TODO (#27672): Enable when the ReportScheduler is implemented and remove the call to ScheduleRun() +#if 0 + if(nullptr != mObserver) + { + mObserver->OnBecameReportable(this); + } +#endif InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); } } @@ -853,9 +916,17 @@ void ReadHandler::SetStateFlag(ReadHandlerFlags aFlag, bool aValue) { bool oldReportable = IsReportableNow(); mFlags.Set(aFlag, aValue); + // If we became reportable, schedule a reporting run. if (!oldReportable && IsReportableNow()) { +// TODO (#27672): Enable when the ReportScheduler is implemented and remove the call to ScheduleRun() +#if 0 + if(nullptr != mObserver) + { + mObserver->OnBecameReportable(this); + } +#endif InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); } } diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index f460188935223e..77c88c12cd1ff9 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -64,6 +64,8 @@ namespace app { namespace reporting { class Engine; class TestReportingEngine; +class ReportScheduler; +class TestReportScheduler; } // namespace reporting class InteractionModelEngine; @@ -152,6 +154,38 @@ class ReadHandler : public Messaging::ExchangeDelegate virtual ApplicationCallback * GetAppCallback() = 0; }; + // TODO (#27675) : Merge existing callback and observer into one class and have an observer pool in the Readhandler to notify + // every + /* + * Observer class for ReadHandler, meant to allow multiple objects to observe the ReadHandler. Currently only one observer is + * supported but all above callbacks should be merged into observer type and an observer pool should be added to allow multiple + * objects to observe ReadHandler + */ + class Observer + { + public: + virtual ~Observer() = default; + + /// @brief Callback invoked to notify a ReadHandler was created and can be registered + /// @param[in] apReadHandler ReadHandler getting added + virtual void OnReadHandlerCreated(ReadHandler * apReadHandler) = 0; + + /// @brief Callback invoked when a ReadHandler went from a non reportable state to a reportable state so a report can be + /// sent immediately if the minimal interval allows it. Otherwise the report should be rescheduled to the earliest time + /// allowed. + /// @param[in] apReadHandler ReadHandler that became dirty + virtual void OnBecameReportable(ReadHandler * apReadHandler) = 0; + + /// @brief Callback invoked when the read handler needs to make sure to send a message to the subscriber within the next + /// maxInterval time period. + /// @param[in] apReadHandler ReadHandler that has generated a report + virtual void OnSubscriptionAction(ReadHandler * apReadHandler) = 0; + + /// @brief Callback invoked when a ReadHandler is getting removed so it can be unregistered + /// @param[in] apReadHandler ReadHandler getting destroyed + virtual void OnReadHandlerDestroyed(ReadHandler * apReadHandler) = 0; + }; + /* * Destructor - as part of destruction, it will abort the exchange context * if a valid one still exists. @@ -167,7 +201,8 @@ class ReadHandler : public Messaging::ExchangeDelegate * The callback passed in has to outlive this handler object. * */ - ReadHandler(ManagementCallback & apCallback, Messaging::ExchangeContext * apExchangeContext, InteractionType aInteractionType); + ReadHandler(ManagementCallback & apCallback, Messaging::ExchangeContext * apExchangeContext, InteractionType aInteractionType, + Observer * observer = nullptr); #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS /** @@ -177,7 +212,7 @@ class ReadHandler : public Messaging::ExchangeDelegate * The callback passed in has to outlive this handler object. * */ - ReadHandler(ManagementCallback & apCallback); + ReadHandler(ManagementCallback & apCallback, Observer * observer = nullptr); #endif const ObjectList * GetAttributePathList() const { return mpAttributePathList; } @@ -190,13 +225,22 @@ class ReadHandler : public Messaging::ExchangeDelegate aMaxInterval = mMaxInterval; } + CHIP_ERROR SetMinReportingIntervalForTests(uint16_t aMinInterval) + { + VerifyOrReturnError(IsIdle(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(aMinInterval <= mMaxInterval, CHIP_ERROR_INVALID_ARGUMENT); + // Ensures the new min interval is higher than the subscriber established one. + mMinIntervalFloorSeconds = std::max(mMinIntervalFloorSeconds, aMinInterval); + return CHIP_NO_ERROR; + } + /* - * Set the reporting intervals for the subscription. This SHALL only be called + * Set the maximum reporting interval for the subscription. This SHALL only be called * from the OnSubscriptionRequested callback above. The restriction is as below * MinIntervalFloor ≤ MaxInterval ≤ MAX(SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT, MaxIntervalCeiling) * Where SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT is set to 60m in the spec. */ - CHIP_ERROR SetReportingIntervals(uint16_t aMaxInterval) + CHIP_ERROR SetMaxReportingInterval(uint16_t aMaxInterval) { VerifyOrReturnError(IsIdle(), CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mMinIntervalFloorSeconds <= aMaxInterval, CHIP_ERROR_INVALID_ARGUMENT); @@ -206,6 +250,18 @@ class ReadHandler : public Messaging::ExchangeDelegate return CHIP_NO_ERROR; } + /// @brief Add an observer to the read handler, currently only one observer is supported but all other callbacks should be + /// merged with a general observer type to allow multiple object to observe readhandlers + /// @param aObserver observer to be added + /// @return CHIP_ERROR_INVALID_ARGUMENT if passing in nullptr + CHIP_ERROR SetObserver(Observer * aObserver) + { + VerifyOrReturnError(nullptr != aObserver, CHIP_ERROR_INVALID_ARGUMENT); + // TODO (#27675) : After merging the callbacks and observer, change so the method adds a new observer to an observer pool + mObserver = aObserver; + return CHIP_NO_ERROR; + } + private: PriorityLevel GetCurrentPriority() const { return mCurrentPriority; } EventNumber & GetEventMin() { return mEventMin; } @@ -214,13 +270,13 @@ class ReadHandler : public Messaging::ExchangeDelegate { // WaitingUntilMinInterval is used to prevent subscription data delivery while we are // waiting for the min reporting interval to elapse. - WaitingUntilMinInterval = (1 << 0), + WaitingUntilMinInterval = (1 << 0), // TODO (#27672): Remove once ReportScheduler is implemented or change to test flag // WaitingUntilMaxInterval is used to prevent subscription empty report delivery while we // are waiting for the max reporting interval to elaps. When WaitingUntilMaxInterval // becomes false, we are allowed to send an empty report to keep the // subscription alive on the client. - WaitingUntilMaxInterval = (1 << 1), + WaitingUntilMaxInterval = (1 << 1), // TODO (#27672): Remove once ReportScheduler is implemented // The flag indicating we are in the middle of a series of chunked report messages, this flag will be cleared during // sending last chunked message. @@ -291,6 +347,8 @@ class ReadHandler : public Messaging::ExchangeDelegate bool IsIdle() const { return mState == HandlerState::Idle; } + // TODO (#27672): Change back to IsReportable once ReportScheduler is implemented so this can assess reportability without + // considering timing. The ReporScheduler will handle timing. /// @brief Returns whether the ReadHandler is in a state where it can immediately send a report. This function /// is used to determine whether a report generation should be scheduled for the handler. bool IsReportableNow() const @@ -370,6 +428,7 @@ class ReadHandler : public Messaging::ExchangeDelegate friend class TestReadInteraction; friend class chip::app::reporting::TestReportingEngine; + friend class chip::app::reporting::TestReportScheduler; // // The engine needs to be able to Abort/Close a ReadHandler instance upon completion of work for a given read/subscribe @@ -379,6 +438,10 @@ class ReadHandler : public Messaging::ExchangeDelegate friend class chip::app::reporting::Engine; friend class chip::app::InteractionModelEngine; + // The report scheduler needs to be able to access StateFlag private functions IsGeneratingReports() and IsDirty() to + // know when to schedule a run so it is declared as a friend class. + friend class chip::app::reporting::ReportScheduler; + enum class HandlerState : uint8_t { Idle, ///< The handler has been initialized and is ready @@ -404,10 +467,13 @@ class ReadHandler : public Messaging::ExchangeDelegate /// @brief This function is called when the min interval timer has expired, it restarts the timer on a timeout equal to the /// difference between the max interval and the min interval. - static void MinIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState); - static void MaxIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState); + static void MinIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState); // TODO (#27672): Remove once + // ReportScheduler is implemented. + static void MaxIntervalExpiredCallback(System::Layer * apSystemLayer, void * apAppState); // TODO (#27672): Remove once + // ReportScheduler is implemented. /// @brief This function is called when a report is sent and it restarts the min interval timer. - CHIP_ERROR UpdateReportTimer(); + CHIP_ERROR UpdateReportTimer(); // TODO (#27672) : Remove once ReportScheduler is implemented. + CHIP_ERROR SendSubscribeResponse(); CHIP_ERROR ProcessSubscribeRequest(System::PacketBufferHandle && aPayload); CHIP_ERROR ProcessReadRequest(System::PacketBufferHandle && aPayload); @@ -520,6 +586,9 @@ class ReadHandler : public Messaging::ExchangeDelegate BitFlags mFlags; InteractionType mInteractionType = InteractionType::Read; + // TODO (#27675): Merge all observers into one and that one will dispatch the callbacks to the right place. + Observer * mObserver = nullptr; + #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS // Callbacks to handle server-initiated session success/failure chip::Callback::Callback mOnConnectedCallback; diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 6d5fe8b503500f..5033b0373be684 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -143,7 +143,7 @@ function(chip_configure_data_model APP_TARGET) ${CHIP_APP_BASE_DIR}/util/attribute-storage.cpp ${CHIP_APP_BASE_DIR}/util/attribute-table.cpp ${CHIP_APP_BASE_DIR}/util/binding-table.cpp - ${CHIP_APP_BASE_DIR}/util/IcdMonitoringTable.cpp + ${CHIP_APP_BASE_DIR}/icd/IcdMonitoringTable.cpp ${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp ${CHIP_APP_BASE_DIR}/util/error-mapping.cpp diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 90b38f8a2030fa..e4afdd885195d9 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -165,8 +165,6 @@ template("chip_data_model") { "${_app_root}/clusters/scenes-server/SceneTableImpl.h", "${_app_root}/clusters/scenes-server/scenes-server.h", "${_app_root}/util/DataModelHandler.cpp", - "${_app_root}/util/IcdMonitoringTable.cpp", - "${_app_root}/util/IcdMonitoringTable.h", "${_app_root}/util/attribute-size-util.cpp", "${_app_root}/util/attribute-storage.cpp", "${_app_root}/util/attribute-table.cpp", @@ -197,6 +195,10 @@ template("chip_data_model") { [ invoker.zap_file ]) } + if (!defined(deps)) { + deps = [] + } + foreach(cluster, _cluster_sources) { if (cluster == "door-lock-server") { sources += [ @@ -250,6 +252,23 @@ template("chip_data_model") { "${_app_root}/clusters/scenes-server/ExtensionFieldSetsImpl.cpp", "${_app_root}/clusters/scenes-server/SceneTableImpl.cpp", ] + } else if (cluster == "operational-state-server") { + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.cpp", + "${_app_root}/clusters/${cluster}/${cluster}.h", + "${_app_root}/clusters/${cluster}/operational-state-delegate.h", + ] + } else if (cluster == "icd-management-server") { + sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] + + deps += [ "${chip_root}/src/app/icd:monitoring-table" ] + } else if (cluster == "resource-monitoring-server") { + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.cpp", + "${_app_root}/clusters/${cluster}/${cluster}.h", + "${_app_root}/clusters/${cluster}/resource-monitoring-cluster-objects.cpp", + "${_app_root}/clusters/${cluster}/resource-monitoring-cluster-objects.h", + ] } else { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] } diff --git a/src/app/clusters/basic-information/basic-information.cpp b/src/app/clusters/basic-information/basic-information.cpp index 57f297f1e1c4ad..1e0b1b0d9c0e91 100644 --- a/src/app/clusters/basic-information/basic-information.cpp +++ b/src/app/clusters/basic-information/basic-information.cpp @@ -344,7 +344,11 @@ CHIP_ERROR BasicAttrAccess::WriteLocation(AttributeValueDecoder & aDecoder) ReturnErrorOnFailure(aDecoder.Decode(location)); bool isValidLength = location.size() == DeviceLayer::ConfigurationManager::kMaxLocationLength; - VerifyOrReturnError(isValidLength, StatusIB(Protocols::InteractionModel::Status::InvalidValue).ToChipError()); + if (!isValidLength) + { + ChipLogError(Zcl, "Invalid country code: '%.*s'", static_cast(location.size()), location.data()); + return CHIP_IM_GLOBAL_STATUS(ConstraintError); + } return DeviceLayer::ConfigurationMgr().StoreCountryCode(location.data(), location.size()); } @@ -439,8 +443,6 @@ bool IsLocalConfigDisabled() } // namespace app } // namespace chip -void emberAfBasicInformationClusterServerInitCallback(chip::EndpointId endpoint) {} - void MatterBasicInformationPluginServerInitCallback() { registerAttributeAccessOverride(&gAttrAccess); diff --git a/src/app/clusters/fan-control-server/fan-control-server.cpp b/src/app/clusters/fan-control-server/fan-control-server.cpp index 4c70a4a0f02073..eed33820e0a947 100644 --- a/src/app/clusters/fan-control-server/fan-control-server.cpp +++ b/src/app/clusters/fan-control-server/fan-control-server.cpp @@ -346,8 +346,9 @@ void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAt VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(Zcl, "Failed to get SpeedSetting with error: 0x%02x", status)); - float percent = percentSetting.Value(); - uint8_t speedSetting = static_cast(ceil(speedMax * (percent * 0.01))); + uint16_t percent = percentSetting.Value(); + // Plus 99 then integer divide by 100 instead of multiplying 0.01 to avoid floating point precision error + uint8_t speedSetting = static_cast((speedMax * percent + 99) / 100); if (currentSpeedSetting.IsNull() || speedSetting != currentSpeedSetting.Value()) { 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 7548fe013a6327..ef66957d754d68 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -287,10 +287,21 @@ bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(app::CommandH DeviceControlServer * server = &DeviceLayer::DeviceControlServer::DeviceControlSvr(); Commands::SetRegulatoryConfigResponse::Type response; + auto & countryCode = commandData.countryCode; + bool isValidLength = countryCode.size() == DeviceLayer::ConfigurationManager::kMaxLocationLength; + if (!isValidLength) + { + ChipLogError(Zcl, "Invalid country code: '%.*s'", static_cast(countryCode.size()), countryCode.data()); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::ConstraintError); + return true; + } + if (commandData.newRegulatoryConfig > RegulatoryLocationTypeEnum::kIndoorOutdoor) { response.errorCode = CommissioningErrorEnum::kValueOutsideRange; - response.debugText = commandData.countryCode; + // TODO: How does using the country code in debug text make sense, if + // the real issue is the newRegulatoryConfig value? + response.debugText = countryCode; } else { @@ -304,11 +315,13 @@ bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(app::CommandH if ((locationCapability != to_underlying(RegulatoryLocationTypeEnum::kIndoorOutdoor)) && (location != locationCapability)) { response.errorCode = CommissioningErrorEnum::kValueOutsideRange; - response.debugText = commandData.countryCode; + // TODO: How does using the country code in debug text make sense, if + // the real issue is the newRegulatoryConfig value? + response.debugText = countryCode; } else { - CheckSuccess(server->SetRegulatoryConfig(location, commandData.countryCode), Failure); + CheckSuccess(server->SetRegulatoryConfig(location, countryCode), Failure); Breadcrumb::Set(commandPath.mEndpointId, commandData.breadcrumb); response.errorCode = CommissioningErrorEnum::kOk; } 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 ec2208e056f993..9f29d0b25a6966 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 @@ -300,8 +300,6 @@ void MatterGroupKeyManagementPluginServerInitCallback() // Commands // -void emberAfGroupKeyManagementClusterServerInitCallback(chip::EndpointId endpoint) {} - bool emberAfGroupKeyManagementClusterKeySetWriteCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::DecodableType & commandData) diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp index 8062aa7e06dab2..93378de2880d6b 100644 --- a/src/app/clusters/icd-management-server/icd-management-server.cpp +++ b/src/app/clusters/icd-management-server/icd-management-server.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 45dd512cce55c5..ac436931daabf1 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -246,7 +246,7 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) return; } - ChipLogProgress(Zcl, "Event: move from %d", currentLevel.Value()); + ChipLogDetail(Zcl, "Event: move from %d", currentLevel.Value()); // adjust by the proper amount, either up or down if (state->transitionTimeMs == 0) @@ -267,8 +267,8 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) currentLevel.SetNonNull(static_cast(currentLevel.Value() - 1)); } - ChipLogProgress(Zcl, " to %d ", currentLevel.Value()); - ChipLogProgress(Zcl, "(diff %c1)", state->increasing ? '+' : '-'); + ChipLogDetail(Zcl, " to %d ", currentLevel.Value()); + ChipLogDetail(Zcl, "(diff %c1)", state->increasing ? '+' : '-'); status = Attributes::CurrentLevel::Set(endpoint, currentLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 8bfbbed18d02a2..f32e9dbbf543d9 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -813,7 +813,7 @@ bool OnOffServer::OnWithTimedOffCommand(app::CommandHandler * commandObj, const */ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) { - ChipLogProgress(Zcl, "Timer callback - Entering callbackc"); + ChipLogDetail(Zcl, "Timer callback - Entering callback"); bool isOn = false; OnOff::Attributes::OnOff::Get(endpoint, &isOn); @@ -826,7 +826,7 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) // Update onTime values uint16_t onTime = MIN_TIME_VALUE; OnOff::Attributes::OnTime::Get(endpoint, &onTime); - ChipLogProgress(Zcl, "Timer callback - On Time: %d", onTime); + ChipLogDetail(Zcl, "Timer callback - On Time: %d", onTime); if (onTime > 0) { @@ -836,7 +836,7 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) if (onTime == 0) { - ChipLogProgress(Zcl, "Timer callback - Turning off OnOff"); + ChipLogDetail(Zcl, "Timer callback - Turning off OnOff"); OnOff::Attributes::OffWaitTime::Set(endpoint, 0); setOnOffValue(endpoint, Commands::Off::Id, false); @@ -854,7 +854,7 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) OnOff::Attributes::OffWaitTime::Set(endpoint, offWaitTime); } - ChipLogProgress(Zcl, "Timer Callback - wait Off Time: %d", offWaitTime); + ChipLogDetail(Zcl, "Timer Callback - wait Off Time: %d", offWaitTime); // Validate if necessary to restart timer if (offWaitTime > 0) diff --git a/src/app/clusters/operational-state-server/operational-state-delegate.h b/src/app/clusters/operational-state-server/operational-state-delegate.h new file mode 100644 index 00000000000000..6fd29bd7d48480 --- /dev/null +++ b/src/app/clusters/operational-state-server/operational-state-delegate.h @@ -0,0 +1,321 @@ +/* + * + * Copyright (c) 2023 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 +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace OperationalState { + +constexpr size_t kOperationalStateLabelMaxSize = 64u; +constexpr size_t kOperationalErrorLabelMaxSize = 64u; +constexpr size_t kOperationalErrorDetailsMaxSize = 64u; +constexpr size_t kOperationalPhaseNameMaxSize = 64u; + +/** + * A class which represents the operational state of an Operational State cluster derivation instance. + */ +struct GenericOperationalState : public app::Clusters::detail::Structs::OperationalStateStruct::Type +{ + GenericOperationalState(uint8_t state = to_underlying(OperationalStateEnum::kStopped), Optional label = NullOptional) + { + Set(state, label); + } + + GenericOperationalState(const GenericOperationalState & op) { *this = op; } + + GenericOperationalState & operator=(const GenericOperationalState & op) + { + Set(op.operationalStateID, op.operationalStateLabel); + return *this; + } + + void Set(uint8_t state, Optional label = NullOptional) + { + operationalStateID = state; + if (label.HasValue()) + { + memset(mOperationalStateLabelBuffer, 0, sizeof(mOperationalStateLabelBuffer)); + if (label.Value().size() > sizeof(mOperationalStateLabelBuffer)) + { + memcpy(mOperationalStateLabelBuffer, label.Value().data(), sizeof(mOperationalStateLabelBuffer)); + operationalStateLabel.SetValue(CharSpan(mOperationalStateLabelBuffer, sizeof(mOperationalStateLabelBuffer))); + } + else + { + memcpy(mOperationalStateLabelBuffer, label.Value().data(), label.Value().size()); + operationalStateLabel.SetValue(CharSpan(mOperationalStateLabelBuffer, label.Value().size())); + } + } + else + { + operationalStateLabel = NullOptional; + } + } + +private: + char mOperationalStateLabelBuffer[kOperationalStateLabelMaxSize]; +}; + +/** + * A class which represents the operational error of an Operational State cluster derivation instance. + */ +struct GenericOperationalError : public app::Clusters::detail::Structs::ErrorStateStruct::Type +{ + GenericOperationalError(uint8_t state, Optional label = NullOptional, + Optional details = NullOptional) + { + Set(state, label, details); + } + + GenericOperationalError(const GenericOperationalError & error) { *this = error; } + + GenericOperationalError & operator=(const GenericOperationalError & error) + { + Set(error.errorStateID, error.errorStateLabel, error.errorStateDetails); + return *this; + } + + void Set(uint8_t state, Optional label = NullOptional, Optional details = NullOptional) + { + errorStateID = state; + if (label.HasValue()) + { + memset(mErrorStateLabelBuffer, 0, sizeof(mErrorStateLabelBuffer)); + if (label.Value().size() > sizeof(mErrorStateLabelBuffer)) + { + memcpy(mErrorStateLabelBuffer, label.Value().data(), sizeof(mErrorStateLabelBuffer)); + errorStateLabel.SetValue(CharSpan(mErrorStateLabelBuffer, sizeof(mErrorStateLabelBuffer))); + } + else + { + memcpy(mErrorStateLabelBuffer, label.Value().data(), label.Value().size()); + errorStateLabel.SetValue(CharSpan(mErrorStateLabelBuffer, label.Value().size())); + } + } + else + { + errorStateLabel = NullOptional; + } + + if (details.HasValue()) + { + memset(mErrorStateDetailsBuffer, 0, sizeof(mErrorStateDetailsBuffer)); + if (details.Value().size() > sizeof(mErrorStateDetailsBuffer)) + { + memcpy(mErrorStateDetailsBuffer, details.Value().data(), sizeof(mErrorStateDetailsBuffer)); + errorStateDetails.SetValue(CharSpan(mErrorStateDetailsBuffer, sizeof(mErrorStateDetailsBuffer))); + } + else + { + memcpy(mErrorStateDetailsBuffer, details.Value().data(), details.Value().size()); + errorStateDetails.SetValue(CharSpan(mErrorStateDetailsBuffer, details.Value().size())); + } + } + else + { + errorStateDetails = NullOptional; + } + } + +private: + char mErrorStateLabelBuffer[kOperationalErrorLabelMaxSize]; + char mErrorStateDetailsBuffer[kOperationalErrorDetailsMaxSize]; +}; + +/** + * A class which represents the operational phase of an Operational State cluster derivation instance. + */ +struct GenericOperationalPhase +{ + GenericOperationalPhase(app::DataModel::Nullable name) { Set(name); } + + GenericOperationalPhase(const GenericOperationalPhase & ph) { *this = ph; } + + GenericOperationalPhase & operator=(const GenericOperationalPhase & ph) + { + Set(ph.mPhaseName); + return *this; + } + + bool IsMissing() const { return mPhaseName.IsNull(); } + app::DataModel::Nullable mPhaseName; + +private: + void Set(app::DataModel::Nullable name) + { + if (name.IsNull()) + { + mPhaseName.SetNull(); + } + else + { + memset(mPhaseNameBuffer, 0, sizeof(mPhaseNameBuffer)); + if (name.Value().size() > sizeof(mPhaseNameBuffer)) + { + memcpy(mPhaseNameBuffer, name.Value().data(), sizeof(mPhaseNameBuffer)); + mPhaseName = app::DataModel::Nullable(CharSpan(mPhaseNameBuffer, sizeof(mPhaseNameBuffer))); + } + else + { + memcpy(mPhaseNameBuffer, name.Value().data(), name.Value().size()); + mPhaseName = app::DataModel::Nullable(CharSpan(mPhaseNameBuffer, name.Value().size())); + } + } + } + + char mPhaseNameBuffer[kOperationalPhaseNameMaxSize]; +}; + +/** + * A class which represents the operational completion of an Operational State cluster derivation instance. + */ +struct GenericOperationCompletion : public app::Clusters::OperationalState::Events::OperationCompletion::Type +{ + GenericOperationCompletion(uint8_t aCompletionErrorCode, + const Optional> & aTotalOperationalTime = NullOptional, + const Optional> & aPausedTime = NullOptional) + { + completionErrorCode = aCompletionErrorCode; + totalOperationalTime = aTotalOperationalTime; + pausedTime = aPausedTime; + } +}; + +/** + * A delegate to handle application logic of the Operational State aliased Cluster. + * The delegate API assumes there will be separate delegate objects for each cluster instance. + * (i.e. each separate operational state cluster derivation, on each separate endpoint), + * since the delegate methods are not handed the cluster id or endpoint. + */ +class Delegate +{ +public: + /** + * Get the current operational state. + * @return The current operational state value + */ + virtual uint8_t GetCurrentOperationalState() = 0; + + /** + * Get the list of supported operational states. + * Fills in the provided GenericOperationalState with the state at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of states. + * @param index The index of the state, with 0 representing the first state. + * @param operationalState The GenericOperationalState is filled. + */ + virtual CHIP_ERROR GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) = 0; + + /** + * Get the list of supported operational phases. + * Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. + * @param index The index of the phase, with 0 representing the first phase. + * @param operationalPhase The GenericOperationalPhase is filled. + */ + virtual CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, GenericOperationalPhase & operationalPhase) = 0; + + /** + * Get current operational error. + * @param error The GenericOperationalError to fill with the current operational error value + */ + virtual void GetCurrentOperationalError(GenericOperationalError & error) = 0; + + /** + * Get current phase + * @param phase The app::DataModel::Nullable to fill with the current phase value + */ + virtual void GetCurrentPhase(app::DataModel::Nullable & phase) = 0; + + /** + * Get countdown time + * @param time The app::DataModel::Nullable to fill with the coutdown time value + */ + virtual void GetCountdownTime(app::DataModel::Nullable & time) = 0; + + /** + * Set current operational state. + * @param opState The operational state that should now be the current one. + */ + virtual CHIP_ERROR SetOperationalState(uint8_t opState) = 0; + + /** + * Set operational error. + * @param opErrState The new operational error. + */ + virtual CHIP_ERROR SetOperationalError(const GenericOperationalError & opErrState) = 0; + + /** + * Set operational phase. + * @param phase The operational phase that should now be the current one. + */ + virtual CHIP_ERROR SetPhase(const app::DataModel::Nullable & phase) = 0; + + /** + * Set coutdown time. + * @param time The coutdown time that should now be the current one. + */ + virtual CHIP_ERROR SetCountdownTime(const app::DataModel::Nullable & time) = 0; + + // command callback + /** + * Handle Command Callback in application: Pause + * @param[out] get operational error after callback. + */ + virtual void HandlePauseStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Resume + * @param[out] get operational error after callback. + */ + virtual void HandleResumeStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Start + * @param[out] get operational error after callback. + */ + virtual void HandleStartStateCallback(GenericOperationalError & err) = 0; + + /** + * Handle Command Callback in application: Stop + * @param[out] get operational error after callback. + */ + virtual void HandleStopStateCallback(GenericOperationalError & err) = 0; + + Delegate() = default; + + virtual ~Delegate() = default; +}; + +// @brief Instance getter for the delegate for the given operational state alias cluster on the given endpoint. +// The delegate API assumes there will be separate delegate objects for each cluster instance. +// (i.e. each separate operational state cluster derivation, on each separate endpoint) +// @note This API should always be called prior to using the delegate and the return pointer should never be cached. +// This should be implemented by the application. +// @return Default global delegate instance. +Delegate * GetOperationalStateDelegate(EndpointId endpointId, ClusterId clusterId); + +} // namespace OperationalState +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp new file mode 100644 index 00000000000000..ec54a41f2b7b60 --- /dev/null +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -0,0 +1,296 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/**************************************************************************** + * @file + * @brief Implementation for the Operational State Server Cluster + ***************************************************************************/ +#include "operational-state-server.h" +#include "operational-state-delegate.h" +#include +#include +#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::OperationalState; +using namespace chip::app::Clusters::OperationalState::Attributes; + +using Status = Protocols::InteractionModel::Status; + +CHIP_ERROR OperationalStateServer::Init() +{ + // Check if the cluster has been selected in zap + if (!emberAfContainsServer(mEndpointId, mClusterId)) + { + ChipLogError(Zcl, "Operational State: The cluster with ID %lu was not enabled in zap.", long(mClusterId)); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + ReturnErrorOnFailure(InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); + + VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); + + return CHIP_NO_ERROR; +} + +void OperationalStateServer::Shutdown() +{ + InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); +} + +// This function is called by the interaction model engine when a command destined for this instance is received. +void OperationalStateServer::InvokeCommand(HandlerContext & handlerContext) +{ + ChipLogDetail(Zcl, "OperationalState: InvokeCommand"); + switch (handlerContext.mRequestPath.mCommandId) + { + case Commands::Pause::Id: + ChipLogDetail(Zcl, "OperationalState: Entering handling Pause state"); + + HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & req) { HandlePauseState(ctx, req); }); + break; + + case Commands::Resume::Id: + ChipLogDetail(Zcl, "OperationalState: Entering handling Resume state"); + + HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleResumeState(ctx, req); }); + break; + + case Commands::Start::Id: + ChipLogDetail(Zcl, "OperationalState: Entering handling Start state"); + + HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleStartState(ctx, req); }); + break; + + case Commands::Stop::Id: + ChipLogDetail(Zcl, "OperationalState: Entering handling Stop state"); + + HandleCommand(handlerContext, + [this](HandlerContext & ctx, const auto & req) { HandleStopState(ctx, req); }); + break; + } +} + +void OperationalStateServer::HandlePauseState(HandlerContext & ctx, const Commands::Pause::DecodableType & req) +{ + ChipLogDetail(Zcl, "OperationalState: HandlePauseState"); + Commands::OperationalCommandResponse::Type response; + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + GenericOperationalError err(to_underlying(ErrorStateEnum::kNoError)); + + VerifyOrReturn(delegate != nullptr, ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure)); + uint8_t opState = delegate->GetCurrentOperationalState(); + + if (opState != to_underlying(OperationalStateEnum::kPaused)) + { + delegate->HandlePauseStateCallback(err); + } + response.commandResponseState = err; + + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); +} + +void OperationalStateServer::HandleResumeState(HandlerContext & ctx, const Commands::Resume::DecodableType & req) +{ + ChipLogDetail(Zcl, "OperationalState: HandleResumeState"); + Commands::OperationalCommandResponse::Type response; + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + GenericOperationalError err(to_underlying(ErrorStateEnum::kNoError)); + + VerifyOrReturn(delegate != nullptr, ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure)); + uint8_t opState = delegate->GetCurrentOperationalState(); + + if (opState != to_underlying(OperationalStateEnum::kPaused) && opState != to_underlying(OperationalStateEnum::kRunning)) + { + err.Set(to_underlying(ErrorStateEnum::kCommandInvalidInState)); + } + else if (opState == to_underlying(OperationalStateEnum::kPaused)) + { + delegate->HandleResumeStateCallback(err); + } + response.commandResponseState = err; + + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); +} + +void OperationalStateServer::HandleStartState(HandlerContext & ctx, const Commands::Start::DecodableType & req) +{ + ChipLogDetail(Zcl, "OperationalState: HandleStartState"); + Commands::OperationalCommandResponse::Type response; + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + GenericOperationalError err(to_underlying(ErrorStateEnum::kNoError)); + + VerifyOrReturn(delegate != nullptr, ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure)); + uint8_t opState = delegate->GetCurrentOperationalState(); + + if (opState != to_underlying(OperationalStateEnum::kRunning)) + { + delegate->HandleStartStateCallback(err); + } + response.commandResponseState = err; + + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); +} + +void OperationalStateServer::HandleStopState(HandlerContext & ctx, const Commands::Stop::DecodableType & req) +{ + ChipLogDetail(Zcl, "OperationalState: HandleStopState"); + Commands::OperationalCommandResponse::Type response; + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + GenericOperationalError err(to_underlying(ErrorStateEnum::kNoError)); + + VerifyOrReturn(delegate != nullptr, ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure)); + uint8_t opState = delegate->GetCurrentOperationalState(); + + if (opState != to_underlying(OperationalStateEnum::kStopped)) + { + delegate->HandleStopStateCallback(err); + } + response.commandResponseState = err; + + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); +} + +template +void OperationalStateServer::HandleCommand(HandlerContext & handlerContext, FuncT func) +{ + if (!handlerContext.mCommandHandled && (handlerContext.mRequestPath.mCommandId == RequestT::GetCommandId())) + { + RequestT requestPayload; + + // + // If the command matches what the caller is looking for, let's mark this as being handled + // even if errors happen after this. This ensures that we don't execute any fall-back strategies + // to handle this command since at this point, the caller is taking responsibility for handling + // the command in its entirety, warts and all. + // + handlerContext.SetCommandHandled(); + + if (DataModel::Decode(handlerContext.mPayload, requestPayload) != CHIP_NO_ERROR) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, + Protocols::InteractionModel::Status::InvalidCommand); + return; + } + + func(handlerContext, requestPayload); + } +} + +CHIP_ERROR OperationalStateServer::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + switch (aPath.mAttributeId) + { + case OperationalState::Attributes::OperationalStateList::Id: { + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INCORRECT_STATE, ChipLogError(Zcl, "Delegate is nullptr")); + + return aEncoder.EncodeList([delegate](const auto & encoder) -> CHIP_ERROR { + GenericOperationalState opState; + size_t index = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + while ((err = delegate->GetOperationalStateAtIndex(index, opState)) == CHIP_NO_ERROR) + { + ReturnErrorOnFailure(encoder.Encode(opState)); + index++; + } + if (err == CHIP_ERROR_NOT_FOUND) + { + return CHIP_NO_ERROR; + } + return err; + }); + } + break; + + case OperationalState::Attributes::OperationalState::Id: { + + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INCORRECT_STATE, ChipLogError(Zcl, "Delegate is nullptr")); + uint8_t opState = delegate->GetCurrentOperationalState(); + return aEncoder.Encode(opState); + } + break; + + case OperationalState::Attributes::OperationalError::Id: { + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + GenericOperationalError opErr(to_underlying(ErrorStateEnum::kNoError)); + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INCORRECT_STATE, ChipLogError(Zcl, "Delegate is nullptr")); + delegate->GetCurrentOperationalError(opErr); + return aEncoder.Encode(opErr); + } + break; + + case OperationalState::Attributes::PhaseList::Id: { + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + + GenericOperationalPhase phase = GenericOperationalPhase(DataModel::Nullable()); + size_t index = 0; + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INCORRECT_STATE, ChipLogError(Zcl, "Delegate is nullptr")); + + if (delegate->GetOperationalPhaseAtIndex(index, phase) == CHIP_ERROR_NOT_FOUND || phase.IsMissing()) + { + return aEncoder.EncodeNull(); + } + return aEncoder.EncodeList([&](const auto & encoder) -> CHIP_ERROR { + while (delegate->GetOperationalPhaseAtIndex(index, phase) != CHIP_ERROR_NOT_FOUND) + { + ReturnErrorOnFailure(encoder.Encode(phase.mPhaseName)); + index++; + } + return CHIP_NO_ERROR; + }); + } + break; + + case OperationalState::Attributes::CurrentPhase::Id: { + DataModel::Nullable currentPhase; + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INCORRECT_STATE, ChipLogError(Zcl, "Delegate is nullptr")); + delegate->GetCurrentPhase(currentPhase); + return aEncoder.Encode(currentPhase); + } + break; + + case OperationalState::Attributes::CountdownTime::Id: { + DataModel::Nullable countdownTime; + Delegate * delegate = OperationalState::GetOperationalStateDelegate(mEndpointId, mClusterId); + + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INCORRECT_STATE, ChipLogError(Zcl, "Delegate is nullptr")); + delegate->GetCountdownTime(countdownTime); + return aEncoder.Encode(countdownTime); + } + break; + } + return CHIP_NO_ERROR; +} diff --git a/src/app/clusters/operational-state-server/operational-state-server.h b/src/app/clusters/operational-state-server/operational-state-server.h new file mode 100644 index 00000000000000..247ef3779ffd7a --- /dev/null +++ b/src/app/clusters/operational-state-server/operational-state-server.h @@ -0,0 +1,120 @@ +/* + * + * Copyright (c) 2023 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 +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace OperationalState { + +class Uncopyable +{ +protected: + Uncopyable() {} + ~Uncopyable() {} + +private: + Uncopyable(const Uncopyable &) = delete; + Uncopyable & operator=(const Uncopyable &) = delete; +}; + +/** + * OperationalStateServer is a class that represents an instance of a derivation of the operational state cluster. + * It implements CommandHandlerInterface so it can generically handle commands for any derivation cluster id. + */ +class OperationalStateServer : public CommandHandlerInterface, public AttributeAccessInterface, public Uncopyable +{ +public: + /** + * Init the operational state server. + * This function must be called after defining a OperationalStateServer class object. + * @param void + * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. + */ + CHIP_ERROR Init(); + + /** + * Shut down the operational state server. + * This function must be called before destroying a OperationalStateServer class object. + * @param void + */ + void Shutdown(); + + /** + * Creates an operational state cluster instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the ModeSelect aliased cluster to be instantiated. + */ + OperationalStateServer(EndpointId aEndpointId, ClusterId aClusterId) : + CommandHandlerInterface(MakeOptional(aEndpointId), aClusterId), + AttributeAccessInterface(MakeOptional(aEndpointId), aClusterId) + { + + mEndpointId = aEndpointId; + mClusterId = aClusterId; + } + + ~OperationalStateServer() override {} + +private: + // Inherited from CommandHandlerInterface + template + void HandleCommand(HandlerContext & handlerContext, FuncT func); + + // Inherited from CommandHandlerInterface + void InvokeCommand(HandlerContext & ctx) override; + + /// IM-level implementation of read + /// + /// Returns appropriately mapped CHIP_ERROR if applicable (may return CHIP_IM_GLOBAL_STATUS errors) + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + + /** + * Handle Command: Pause. + */ + void HandlePauseState(HandlerContext & ctx, const Commands::Pause::DecodableType & req); + + /** + * Handle Command: Resume. + */ + void HandleResumeState(HandlerContext & ctx, const Commands::Resume::DecodableType & req); + + /** + * Handle Command: Start. + */ + void HandleStartState(HandlerContext & ctx, const Commands::Start::DecodableType & req); + + /** + * Handle Command: Stop. + */ + void HandleStopState(HandlerContext & ctx, const Commands::Stop::DecodableType & req); + + EndpointId mEndpointId; + ClusterId mClusterId; +}; + +} // namespace OperationalState +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp index 1a8fda8f322c24..60cc54277c36cd 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp @@ -192,7 +192,11 @@ void DefaultOTARequestorDriver::ApplyTimerHandler(System::Layer * systemLayer, v DefaultOTARequestorDriver * driver = ToDriver(appState); VerifyOrDie(driver->mImageProcessor != nullptr); - driver->mImageProcessor->Apply(); + + if (driver->mImageProcessor->Apply() != CHIP_NO_ERROR) + { + driver->mRequestor->CancelImageUpdate(); + } } void DefaultOTARequestorDriver::UpdateAvailable(const UpdateDescription & update, System::Clock::Seconds32 delay) diff --git a/src/app/clusters/refrigerator-alarm-server/refrigerator-alarm-server.cpp b/src/app/clusters/refrigerator-alarm-server/refrigerator-alarm-server.cpp index ea609dd9578645..aefc65ecd8a05a 100644 --- a/src/app/clusters/refrigerator-alarm-server/refrigerator-alarm-server.cpp +++ b/src/app/clusters/refrigerator-alarm-server/refrigerator-alarm-server.cpp @@ -197,6 +197,4 @@ void RefrigeratorAlarmServer::SendNotifyEvent(EndpointId endpointId, BitMask +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace ResourceMonitoring { + +static constexpr std::array AliasedClusters = { 0x0071, 0x0072 }; + +// Enum for ChangeIndicationEnum +enum class ChangeIndicationEnum : uint8_t +{ + kOk = 0x00, + kWarning = 0x01, + kCritical = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = UINT8_MAX, +}; + +// Enum for DegradationDirectionEnum +enum class DegradationDirectionEnum : uint8_t +{ + kUp = 0x00, + kDown = 0x01, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = UINT8_MAX, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kCondition = 0x1, + kWarning = 0x2, + // TODO(#27577): add server support for REP feature (ReplacementProductList) +}; + +namespace Attributes { + +namespace Condition { +static constexpr AttributeId Id = 0x00000000; +struct TypeInfo +{ + using Type = chip::Percent; + using DecodableType = chip::Percent; + using DecodableArgType = chip::Percent; + + static constexpr AttributeId GetAttributeId() { return Attributes::Condition::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Condition + +namespace DegradationDirection { +static constexpr AttributeId Id = 0x00000001; +struct TypeInfo +{ + using Type = DegradationDirectionEnum; + using DecodableType = DegradationDirectionEnum; + using DecodableArgType = DegradationDirectionEnum; + + static constexpr AttributeId GetAttributeId() { return Attributes::DegradationDirection::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DegradationDirection + +namespace ChangeIndication { +static constexpr AttributeId Id = 0x00000002; +struct TypeInfo +{ + using Type = ChangeIndicationEnum; + using DecodableType = ChangeIndicationEnum; + using DecodableArgType = ChangeIndicationEnum; + + static constexpr AttributeId GetAttributeId() { return Attributes::ChangeIndication::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ChangeIndication + +namespace InPlaceIndicator { +static constexpr AttributeId Id = 0x00000003; +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr AttributeId GetAttributeId() { return Attributes::InPlaceIndicator::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace InPlaceIndicator + +namespace LastChangedTime { +static constexpr AttributeId Id = 0x00000004; +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr AttributeId GetAttributeId() { return Attributes::LastChangedTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LastChangedTime + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ +}; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; + +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ +}; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; + +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ +}; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ +}; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ +}; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; + +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ +}; +} // namespace ClusterRevision + +} // namespace Attributes + +namespace Commands { +namespace ResetCondition { +static constexpr CommandId Id = 0x00000000; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ResetCondition +} // namespace Commands + +} // namespace ResourceMonitoring +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp new file mode 100644 index 00000000000000..0d46c7561041bc --- /dev/null +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp @@ -0,0 +1,356 @@ +/* + * + * Copyright (c) 2023 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// using namespace std; +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ResourceMonitoring; +using chip::Protocols::InteractionModel::Status; + +namespace chip { +namespace app { +namespace Clusters { +namespace ResourceMonitoring { + +CHIP_ERROR Instance::Init() +{ + ChipLogDetail(Zcl, "ResourceMonitoring: Init"); + // Check that the cluster ID given is a valid mode select alias cluster ID. + VerifyOrDie(IsValidAliasCluster()); + + // Check if the cluster has been selected in zap + VerifyOrDie(emberAfContainsServer(mEndpointId, mClusterId)); + + LoadPersistentAttributes(); + + ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); + VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); + ChipLogDetail(Zcl, "ResourceMonitoring: calling AppInit()"); + ReturnErrorOnFailure(AppInit()); + + return CHIP_NO_ERROR; +} + +bool Instance::HasFeature(ResourceMonitoring::Feature aFeature) const +{ + return ((mFeatureMap & to_underlying(aFeature)) != 0); +} + +chip::Protocols::InteractionModel::Status Instance::UpdateCondition(uint8_t aNewCondition) +{ + auto oldCondition = mCondition; + mCondition = aNewCondition; + if (mCondition != oldCondition) + { + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::Condition::Id); + } + return Protocols::InteractionModel::Status::Success; +} + +chip::Protocols::InteractionModel::Status +Instance::UpdateChangeIndication(chip::app::Clusters::ResourceMonitoring::ChangeIndicationEnum aNewChangeIndication) +{ + if (aNewChangeIndication == chip::app::Clusters::ResourceMonitoring::ChangeIndicationEnum::kWarning) + { + if (!HasFeature(ResourceMonitoring::Feature::kWarning)) + { + return Protocols::InteractionModel::Status::InvalidValue; + } + } + auto oldChangeIndication = mChangeIndication; + mChangeIndication = aNewChangeIndication; + if (mChangeIndication != oldChangeIndication) + { + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::ChangeIndication::Id); + } + return Protocols::InteractionModel::Status::Success; +} + +chip::Protocols::InteractionModel::Status Instance::UpdateInPlaceIndicator(bool aNewInPlaceIndicator) +{ + auto oldInPlaceIndicator = mInPlaceIndicator; + mInPlaceIndicator = aNewInPlaceIndicator; + if (mInPlaceIndicator != oldInPlaceIndicator) + { + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::InPlaceIndicator::Id); + } + return Protocols::InteractionModel::Status::Success; +} + +chip::Protocols::InteractionModel::Status Instance::UpdateLastChangedTime(DataModel::Nullable aNewLastChangedTime) +{ + auto oldLastchangedTime = mLastChangedTime; + mLastChangedTime = aNewLastChangedTime; + if (mLastChangedTime != oldLastchangedTime) + { + chip::app::GetAttributePersistenceProvider()->WriteScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::LastChangedTime::Id), mLastChangedTime); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::LastChangedTime::Id); + } + return Protocols::InteractionModel::Status::Success; +} + +uint8_t Instance::GetCondition() const +{ + return mCondition; +} +chip::app::Clusters::ResourceMonitoring::ChangeIndicationEnum Instance::GetChangeIndication() const +{ + return mChangeIndication; +} + +chip::app::Clusters::ResourceMonitoring::DegradationDirectionEnum Instance::GetDegradationDirection() const +{ + return mDegradationDirection; +} + +bool Instance::GetInPlaceIndicator() const +{ + return mInPlaceIndicator; +} + +DataModel::Nullable Instance::GetLastChangedTime() const +{ + return mLastChangedTime; +} + +Status Instance::OnResetCondition() +{ + ChipLogDetail(Zcl, "ResourceMonitoringServer::OnResetCondition()"); + + // call apllication specific pre reset logic, + // anything other than Success will cause the command to fail, and not do any of the resets + auto status = PreResetCondition(); + if (status != Status::Success) + { + return status; + } + // Handle the reset of the condition attribute, if supported + if (emberAfContainsAttribute(GetEndpointId(), mClusterId, Attributes::Condition::Id)) + { + if (GetDegradationDirection() == DegradationDirectionEnum::kDown) + { + UpdateCondition(100); + } + else if (GetDegradationDirection() == DegradationDirectionEnum::kUp) + { + UpdateCondition(0); + } + } + + // handle the reset of the ChangeIndication attribute, mandatory + UpdateChangeIndication(ChangeIndicationEnum::kOk); + + // Handle the reset of the LastChangedTime attribute, if supported + if (emberAfContainsAttribute(GetEndpointId(), mClusterId, Attributes::LastChangedTime::Id)) + { + System::Clock::Milliseconds64 currentUnixTimeMS; + System::Clock::ClockImpl clock; + CHIP_ERROR err = clock.GetClock_RealTimeMS(currentUnixTimeMS); + if (err == CHIP_NO_ERROR) + { + System::Clock::Seconds32 currentUnixTime = std::chrono::duration_cast(currentUnixTimeMS); + UpdateLastChangedTime(DataModel::MakeNullable(currentUnixTime.count())); + } + } + + // call apllication specific post reset logic + status = PostResetCondition(); + return status; +} + +Status Instance::PreResetCondition() +{ + ChipLogDetail(Zcl, "ResourceMonitoringServer::PreResetCondition()"); + return Status::Success; +} + +Status Instance::PostResetCondition() +{ + ChipLogDetail(Zcl, "ResourceMonitoringServer::PostResetCondition()"); + return Status::Success; +} + +// This method is called by the interaction model engine when a command destined for this instance is received. +void Instance::InvokeCommand(HandlerContext & handlerContext) +{ + ChipLogDetail(Zcl, "ResourceMonitoring Instance::InvokeCommand"); + switch (handlerContext.mRequestPath.mCommandId) + { + case ResourceMonitoring::Commands::ResetCondition::Id: + ChipLogDetail(Zcl, "ResourceMonitoring::Commands::ResetCondition"); + + HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & commandData) { HandleResetCondition(ctx, commandData); }); + break; + } +} + +// List the commands supported by this instance. +CHIP_ERROR Instance::EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, + CommandHandlerInterface::CommandIdCallback callback, void * context) +{ + ChipLogDetail(Zcl, "resourcemonitoring: EnumerateAcceptedCommands"); + if (mResetConditionCommandSupported) + { + callback(ResourceMonitoring::Commands::ResetCondition::Id, context); + } + + return CHIP_NO_ERROR; +} + +// Implements the read functionality for non-standard attributes. +CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + switch (aPath.mAttributeId) + { + case Attributes::Condition::Id: { + ReturnErrorOnFailure(aEncoder.Encode(mCondition)); + break; + } + case Attributes::FeatureMap::Id: { + ReturnErrorOnFailure(aEncoder.Encode(mFeatureMap)); + break; + } + case Attributes::DegradationDirection::Id: { + ReturnErrorOnFailure(aEncoder.Encode(mDegradationDirection)); + break; + } + case Attributes::ChangeIndication::Id: { + ReturnErrorOnFailure(aEncoder.Encode(mChangeIndication)); + break; + } + case Attributes::InPlaceIndicator::Id: { + ReturnErrorOnFailure(aEncoder.Encode(mInPlaceIndicator)); + break; + } + case Attributes::LastChangedTime::Id: { + ReturnErrorOnFailure(aEncoder.Encode(mLastChangedTime)); + break; + } + } + return CHIP_NO_ERROR; +} + +// Implements checking before attribute writes. +CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +{ + switch (aPath.mAttributeId) + { + case Attributes::LastChangedTime::Id: { + DataModel::Nullable newLastChangedTime; + ReturnErrorOnFailure(aDecoder.Decode(newLastChangedTime)); + UpdateLastChangedTime(newLastChangedTime); + break; + } + } + return CHIP_NO_ERROR; +} + +template +void Instance::HandleCommand(HandlerContext & handlerContext, FuncT func) +{ + ChipLogDetail(Zcl, "ResourceMonitoring: HandleCommand"); + if (handlerContext.mCommandHandled || (handlerContext.mRequestPath.mCommandId != RequestT::GetCommandId())) + { + return; + } + + RequestT requestPayload; + + // If the command matches what the caller is looking for, let's mark this as being handled + // even if errors happen after this. This ensures that we don't execute any fall-back strategies + // to handle this command since at this point, the caller is taking responsibility for handling + // the command in its entirety, warts and all. + handlerContext.SetCommandHandled(); + + if (DataModel::Decode(handlerContext.mPayload, requestPayload) != CHIP_NO_ERROR) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand); + return; + } + + func(handlerContext, requestPayload); +} + +void Instance::LoadPersistentAttributes() +{ + CHIP_ERROR err = chip::app::GetAttributePersistenceProvider()->ReadScalarValue( + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::LastChangedTime::Id), mLastChangedTime); + if (err == CHIP_NO_ERROR) + { + if (mLastChangedTime.IsNull()) + { + ChipLogDetail(Zcl, "ResourceMonitoring: Loaded LastChangedTime as null"); + } + else + { + ChipLogDetail(Zcl, "ResourceMonitoring: Loaded LastChangedTime as %lu", + (long unsigned int) mLastChangedTime.Value()); // on some platforms uint32_t is a long, cast it to + // unsigned long on all platforms to prevent CI errors + } + } + else + { + // If we cannot find the previous LastChangedTime, we will assume it to be null. + ChipLogDetail(Zcl, "ResourceMonitoring: Unable to load the LastChangedTime from the KVS. Assuming null"); + } +} + +bool Instance::IsValidAliasCluster() const +{ + for (unsigned int AliasedCluster : AliasedClusters) + { + if (mClusterId == AliasedCluster) + { + return true; + } + } + return false; +} + +void Instance::HandleResetCondition(HandlerContext & ctx, + const ResourceMonitoring::Commands::ResetCondition::DecodableType & commandData) +{ + + Status resetConditionStatus = OnResetCondition(); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, resetConditionStatus); +} + +} // namespace ResourceMonitoring +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.h b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.h new file mode 100644 index 00000000000000..cc846bab94420d --- /dev/null +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.h @@ -0,0 +1,198 @@ +/* + * + * Copyright (c) 2023 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace ResourceMonitoring { + +class Instance : public CommandHandlerInterface, public AttributeAccessInterface +{ + +public: + /** + * Initialise the Resource Monitoring cluster. + * + * @die If the cluster ID given is not a valid Resource Monitoring cluster ID. + * @die If the endpoint and cluster ID have not been enabled in zap. + * @return CHIP_ERROR_INVALID_ARGUMENT If the CommandHandler or Attribute Handler could not be registered. + * @return CHIP_ERROR_INCORRECT_STATE If the CommandHandler was already registered + * @return CHIP_ERROR_INCORRECT_STATE If the registerAttributeAccessOverride fails. + * @return CHIP_ERROR If the AppInit() method returned an error. This is application specific. + * + * @return CHIP_NO_ERROR If the cluster was initialised successfully. + */ + CHIP_ERROR Init(); + + /** + * Checks if the given feature is supported by the cluster. + * @param feature The aFeature to check. + * + * @return true If the feature is supported. + * @return false If the feature is not supported. + */ + bool HasFeature(ResourceMonitoring::Feature aFeature) const; + + // Attribute setters + chip::Protocols::InteractionModel::Status UpdateCondition(uint8_t aNewCondition); + chip::Protocols::InteractionModel::Status UpdateChangeIndication(ChangeIndicationEnum aNewChangeIndication); + chip::Protocols::InteractionModel::Status UpdateInPlaceIndicator(bool aNewInPlaceIndicator); + chip::Protocols::InteractionModel::Status UpdateLastChangedTime(DataModel::Nullable aNewLastChangedTime); + + // Attribute getters + uint8_t GetCondition() const; + ChangeIndicationEnum GetChangeIndication() const; + DegradationDirectionEnum GetDegradationDirection() const; + bool GetInPlaceIndicator() const; + DataModel::Nullable GetLastChangedTime() const; + EndpointId GetEndpointId() const { return mEndpointId; } + + /** + * Creates a resource monitoring cluster instance. The Init() method needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the ResourceMonitoring aliased cluster to be instantiated. + * @param aFeatureMap The feature map of the cluster. + * @param aDegradationDirection The degradation direction of the cluster. + * @param aResetConditionCommandSupported Whether the ResetCondition command is supported by the cluster. + */ + Instance(EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeatureMap, + ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, + bool aResetConditionCommandSupported) : + CommandHandlerInterface(Optional(aEndpointId), aClusterId), + AttributeAccessInterface(Optional(aEndpointId), aClusterId), mEndpointId(aEndpointId), mClusterId(aClusterId), + mDegradationDirection(aDegradationDirection), mFeatureMap(aFeatureMap), + mResetConditionCommandSupported(aResetConditionCommandSupported) + {} + + ~Instance() = default; + + // Not copyable or movable + Instance(const Instance &) = delete; + Instance & operator=(const Instance &) = delete; + Instance(Instance &&) = delete; + Instance & operator=(Instance &&) = delete; + + // The following methods should be overridden by the SDK user to implement the business logic of their application + + /** + * This init method will be called during Resource Monitoring Server initialization after the instance information has been + * validated and the instance has been registered. This method should be overridden by the SDK user to initialize the + * application logic. + * + * @return CHIP_NO_ERROR If the application was initialized successfully. All other values will cause the initialization to + * fail. + */ + virtual CHIP_ERROR AppInit() = 0; + + /** + * This method may be overwritten by the SDK User, if the default behaviour is not desired. + * Preferably, the SDK User should implement the PreResetCondition() and PostResetCondition() methods instead. + * + * The cluster implementation will handle all of the resets needed by the spec. + * - Update the Condition attribute according to the DegradationDirection (if supported) + * - Update the ChangeIndicator attribute to kOk + * - Update the LastChangedTime attribute (if supported) + * + * The return value will depend on the PreResetCondition() and PostResetCondition() method, if one of them does not return + * Success, this method will return the failure as well. + * @return Status::Success If the command was handled successfully. + * @return All Other PreResetCondition() or PostResetCondition() failed, these are application specific. + */ + virtual chip::Protocols::InteractionModel::Status OnResetCondition(); + + /** + * This method may be overwritten by the SDK User, if the SDK User wants to do something before the reset. + * If there are some internal states of the devices or some specific methods that must be called, that are needed for the reset + * and that can fail, they should be done here and not in PostResetCondition(). + * + * @return Status::Success All good, the reset may proceed. + * @return All Other The reset should not proceed. The reset command will fail. + */ + virtual chip::Protocols::InteractionModel::Status PreResetCondition(); + + /** + * This method may be overwritten by the SDK User, if the SDK User wants to do something after the reset. + * If this fails, the attributes will already be updated, so the SDK User should not do something here + * that can fail and that will affect the state of the device. Do the checks in the PreResetCondition() method instead. + * + * @return Status::Success All good + * @return All Other Something went wrong. The attributes will already be updated. But the reset command will report + * the failure. + */ + virtual chip::Protocols::InteractionModel::Status PostResetCondition(); + +private: + EndpointId mEndpointId{}; + ClusterId mClusterId{}; + + // attribute Data Store + chip::Percent mCondition = 100; + DegradationDirectionEnum mDegradationDirection = DegradationDirectionEnum::kDown; + ChangeIndicationEnum mChangeIndication = ChangeIndicationEnum::kOk; + bool mInPlaceIndicator = true; + DataModel::Nullable mLastChangedTime; + + uint32_t mFeatureMap; + + bool mResetConditionCommandSupported = false; + + // CommandHandlerInterface + void InvokeCommand(HandlerContext & ctx) override; + CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + + template + void HandleCommand(HandlerContext & handlerContext, FuncT func); + + void LoadPersistentAttributes(); + + /** + * This checks if the clusters instance is a valid ResourceMonitoring cluster based on the AliasedClusters list. + * @return true if the cluster is a valid ResourceMonitoring cluster. + */ + bool IsValidAliasCluster() const; + + /** + * Internal method to handle the ResetCondition command. + */ + void HandleResetCondition(HandlerContext & ctx, + const ResourceMonitoring::Commands::ResetCondition::DecodableType & commandData); +}; + +} // namespace ResourceMonitoring +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp index 733cead11265ac..aa1d6fe59e0b28 100644 --- a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp @@ -83,9 +83,14 @@ bool SmokeCoAlarmServer::SetSmokeState(EndpointId endpointId, AlarmStateEnum new if (success && (newSmokeState == AlarmStateEnum::kWarning || newSmokeState == AlarmStateEnum::kCritical)) { - Events::SmokeAlarm::Type event{}; + Events::SmokeAlarm::Type event{ newSmokeState }; SendEvent(endpointId, event); } + + if (success && (newSmokeState == AlarmStateEnum::kCritical)) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); + } } return success; @@ -102,9 +107,14 @@ bool SmokeCoAlarmServer::SetCOState(EndpointId endpointId, AlarmStateEnum newCOS if (success && (newCOState == AlarmStateEnum::kWarning || newCOState == AlarmStateEnum::kCritical)) { - Events::COAlarm::Type event{}; + Events::COAlarm::Type event{ newCOState }; SendEvent(endpointId, event); } + + if (success && (newCOState == AlarmStateEnum::kCritical)) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); + } } return success; @@ -121,9 +131,14 @@ bool SmokeCoAlarmServer::SetBatteryAlert(EndpointId endpointId, AlarmStateEnum n if (success && (newBatteryAlert == AlarmStateEnum::kWarning || newBatteryAlert == AlarmStateEnum::kCritical)) { - Events::LowBattery::Type event{}; + Events::LowBattery::Type event{ newBatteryAlert }; SendEvent(endpointId, event); } + + if (success && (newBatteryAlert == AlarmStateEnum::kCritical)) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); + } } return success; @@ -136,7 +151,58 @@ bool SmokeCoAlarmServer::SetDeviceMuted(EndpointId endpointId, MuteStateEnum new if (success && (deviceMuted != newDeviceMuted)) { - success = SetAttribute(endpointId, Attributes::DeviceMuted::Id, Attributes::DeviceMuted::Set, newDeviceMuted); + if (newDeviceMuted == MuteStateEnum::kMuted) + { + AlarmStateEnum alarmState; + success = GetAttribute(endpointId, Attributes::SmokeState::Id, Attributes::SmokeState::Get, alarmState); + if (success && (alarmState == AlarmStateEnum::kCritical)) + { + success = false; + } + + if (success) + { + success = GetAttribute(endpointId, Attributes::COState::Id, Attributes::COState::Get, alarmState); + if (success && (alarmState == AlarmStateEnum::kCritical)) + { + success = false; + } + } + + if (success) + { + success = GetAttribute(endpointId, Attributes::BatteryAlert::Id, Attributes::BatteryAlert::Get, alarmState); + if (success && (alarmState == AlarmStateEnum::kCritical)) + { + success = false; + } + } + + if (success) + { + success = GetAttribute(endpointId, Attributes::InterconnectSmokeAlarm::Id, Attributes::InterconnectSmokeAlarm::Get, + alarmState); + if (success && (alarmState == AlarmStateEnum::kCritical)) + { + success = false; + } + } + + if (success) + { + success = + GetAttribute(endpointId, Attributes::InterconnectCOAlarm::Id, Attributes::InterconnectCOAlarm::Get, alarmState); + if (success && (alarmState == AlarmStateEnum::kCritical)) + { + success = false; + } + } + } + + if (success) + { + success = SetAttribute(endpointId, Attributes::DeviceMuted::Id, Attributes::DeviceMuted::Set, newDeviceMuted); + } if (success) { @@ -231,9 +297,14 @@ bool SmokeCoAlarmServer::SetInterconnectSmokeAlarm(EndpointId endpointId, AlarmS if (success && (newInterconnectSmokeAlarm == AlarmStateEnum::kWarning || newInterconnectSmokeAlarm == AlarmStateEnum::kCritical)) { - Events::InterconnectSmokeAlarm::Type event{}; + Events::InterconnectSmokeAlarm::Type event{ newInterconnectSmokeAlarm }; SendEvent(endpointId, event); } + + if (success && (newInterconnectSmokeAlarm == AlarmStateEnum::kCritical)) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); + } } return success; @@ -252,9 +323,14 @@ bool SmokeCoAlarmServer::SetInterconnectCOAlarm(EndpointId endpointId, AlarmStat if (success && (newInterconnectCOAlarm == AlarmStateEnum::kWarning || newInterconnectCOAlarm == AlarmStateEnum::kCritical)) { - Events::InterconnectCOAlarm::Type event{}; + Events::InterconnectCOAlarm::Type event{ newInterconnectCOAlarm }; SendEvent(endpointId, event); } + + if (success && (newInterconnectCOAlarm == AlarmStateEnum::kCritical)) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); + } } return success; @@ -350,6 +426,11 @@ bool SmokeCoAlarmServer::GetSensitivityLevel(EndpointId endpointId, SensitivityE return GetAttribute(endpointId, Attributes::SensitivityLevel::Id, Attributes::SensitivityLevel::Get, sensitivityLevel); } +bool SmokeCoAlarmServer::GetExpiryDate(EndpointId endpointId, uint32_t & expiryDate) +{ + return GetAttribute(endpointId, Attributes::ExpiryDate::Id, Attributes::ExpiryDate::Get, expiryDate); +} + chip::BitFlags SmokeCoAlarmServer::GetFeatures(EndpointId endpointId) { chip::BitFlags featureMap; diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h index 1adf563c4d53ff..2c43c9ed636961 100644 --- a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h @@ -72,7 +72,6 @@ class SmokeCoAlarmServer bool SetInterconnectCOAlarm(chip::EndpointId endpointId, AlarmStateEnum newInterconnectCOAlarm); bool SetContaminationState(chip::EndpointId endpointId, ContaminationStateEnum newContaminationState); bool SetSensitivityLevel(chip::EndpointId endpointId, SensitivityEnum newSensitivityLevel); - // bool SetExpiryDate(chip::EndpointId endpointId, Date newExpiryDate); // TODO: Date type encoding not defined bool GetExpressedState(chip::EndpointId endpointId, ExpressedStateEnum & expressedState); bool GetSmokeState(chip::EndpointId endpointId, AlarmStateEnum & smokeState); @@ -86,7 +85,7 @@ class SmokeCoAlarmServer bool GetInterconnectCOAlarm(chip::EndpointId endpointId, AlarmStateEnum & interconnectCOAlarm); bool GetContaminationState(chip::EndpointId endpointId, ContaminationStateEnum & contaminationState); bool GetSensitivityLevel(chip::EndpointId endpointId, SensitivityEnum & sensitivityLevel); - // bool GetExpiryDate(chip::EndpointId endpointId, Date & expiryDate); // TODO: Date type encoding not defined + bool GetExpiryDate(chip::EndpointId endpointId, uint32_t & expiryDate); chip::BitFlags GetFeatures(chip::EndpointId endpointId); diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index dada0c43b3deca..1f341047fa9921 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -24,11 +24,13 @@ CommandHandlerInterfaceOnlyClusters: # This uses asUpperCamelCase versions of the cluster name. - NetworkCommissioning - Scenes + - OperationalState + - ActivatedCarbonFilterMonitoring + - HepaFilterMonitoring # We need a more configurable way of deciding which clusters have which init functions.... # See https://github.com/project-chip/connectedhomeip/issues/4369 ClustersWithInitFunctions: - - Basic - Color Control - Groups - Identify diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn index d70f5077b75dea..a6bd21299bc9e5 100644 --- a/src/app/icd/BUILD.gn +++ b/src/app/icd/BUILD.gn @@ -25,6 +25,16 @@ source_set("manager-srcs") { "ICDManager.h", ] + deps = [ ":monitoring-table" ] + public_deps = [ "${chip_root}/src/credentials:credentials" ] +} + +source_set("monitoring-table") { + sources = [ + "IcdMonitoringTable.cpp", + "IcdMonitoringTable.h", + ] + public_deps = [ "${chip_root}/src/lib/core", "${chip_root}/src/platform:platform", diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index 297daa59d2fbf3..dffb4e0227b76a 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -19,11 +19,13 @@ #include #include #include +#include #include #include #include #include #include +#include namespace chip { namespace app { @@ -32,8 +34,13 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::IcdManagement; -void ICDManager::ICDManager::Init() +void ICDManager::ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricTable) { + VerifyOrDie(storage != nullptr); + VerifyOrDie(fabricTable != nullptr); + mStorage = storage; + mFabricTable = fabricTable; + uint32_t activeModeInterval; if (Attributes::ActiveModeInterval::Get(kRootEndpointId, &activeModeInterval) != EMBER_ZCL_STATUS_SUCCESS) { @@ -49,8 +56,10 @@ void ICDManager::ICDManager::Shutdown() // cancel any running timer of the icd DeviceLayer::SystemLayer().CancelTimer(OnIdleModeDone, this); DeviceLayer::SystemLayer().CancelTimer(OnActiveModeDone, this); - mIcdMode = ICDMode::SIT; + mICDMode = ICDMode::SIT; mOperationalState = OperationalState::IdleMode; + mStorage = nullptr; + mFabricTable = nullptr; } bool ICDManager::SupportsCheckInProtocol() @@ -58,7 +67,6 @@ bool ICDManager::SupportsCheckInProtocol() bool success; uint32_t featureMap; success = (Attributes::FeatureMap::Get(kRootEndpointId, &featureMap) == EMBER_ZCL_STATUS_SUCCESS); - return success ? ((featureMap & to_underlying(Feature::kCheckInProtocolSupport)) != 0) : false; } @@ -68,25 +76,25 @@ void ICDManager::UpdateIcdMode() ICDMode tempMode = ICDMode::SIT; - // TODO ICD LIT FIX DEPENDENCY ISSUE with app/util/IcdMonitoringTable.h and app/server:server // The Check In Protocol Feature is required and the slow polling interval shall also be greater than 15 seconds // to run an ICD in LIT mode. - // if (kSlowPollingInterval > kICDSitModePollingThreashold && SupportsCheckInProtocol()) - // { - // // We can only get to LIT Mode, if at least one client is registered to the ICD device - // const auto & fabricTable = Server::GetInstance().GetFabricTable(); - // for (const auto & fabricInfo : fabricTable) - // { - // PersistentStorageDelegate & storage = Server::GetInstance().GetPersistentStorage(); - // IcdMonitoringTable table(storage, fabricInfo.GetFabricIndex(), 1); - // if (!table.IsEmpty()) - // { - // tempMode = ICDMode::LIT; - // break; - // } - // } - // } - mIcdMode = tempMode; + if (GetSlowPollingInterval() > GetSITPollingThreshold() && SupportsCheckInProtocol()) + { + VerifyOrDie(mStorage != nullptr); + VerifyOrDie(mFabricTable != nullptr); + // We can only get to LIT Mode, if at least one client is registered with the ICD device + for (const auto & fabricInfo : *mFabricTable) + { + // We only need 1 valid entry to ensure LIT compliance + IcdMonitoringTable table(*mStorage, fabricInfo.GetFabricIndex(), 1 /*Table entry limit*/); + if (!table.IsEmpty()) + { + tempMode = ICDMode::LIT; + break; + } + } + } + mICDMode = tempMode; } void ICDManager::UpdateOperationState(OperationalState state) @@ -105,7 +113,17 @@ void ICDManager::UpdateOperationState(OperationalState state) } DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(idleModeInterval), OnIdleModeDone, this); - CHIP_ERROR err = DeviceLayer::ConnectivityMgr().SetPollingInterval(GetSlowPollingInterval()); + System::Clock::Milliseconds32 slowPollInterval = GetSlowPollingInterval(); + // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. + if (mICDMode == ICDMode::SIT && slowPollInterval > GetSITPollingThreshold()) + { + ChipLogDetail(AppServer, "The Slow Polling Interval of an ICD in SIT mode should be <= %" PRIu32, + (GetSITPollingThreshold().count() / 1000)); + // TODO Spec to define this conformance as a SHALL + // slowPollInterval = GetSITPollingThreshold(); + } + + CHIP_ERROR err = DeviceLayer::ConnectivityMgr().SetPollingInterval(slowPollInterval); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "Failed to set Polling Interval: err %" CHIP_ERROR_FORMAT, err.Format()); diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h index b7edf325f767b8..94127d645e9c18 100644 --- a/src/app/icd/ICDManager.h +++ b/src/app/icd/ICDManager.h @@ -16,6 +16,7 @@ */ #pragma once +#include #include #include #include @@ -50,15 +51,16 @@ class ICDManager }; ICDManager() {} - void Init(); + void Init(PersistentStorageDelegate * storage, FabricTable * fabricTable); void Shutdown(); void UpdateIcdMode(); void UpdateOperationState(OperationalState state); void SetKeepActiveModeRequirements(KeepActiveFlags flag, bool state); bool IsKeepActive() { return mKeepActiveFlags.HasAny(); } - ICDMode GetIcdMode() { return mIcdMode; } + ICDMode GetICDMode() { return mICDMode; } OperationalState GetOperationalState() { return mOperationalState; } + static System::Clock::Milliseconds32 GetSITPollingThreshold() { return kSITPollingThreshold; } static System::Clock::Milliseconds32 GetSlowPollingInterval() { return kSlowPollingInterval; } static System::Clock::Milliseconds32 GetFastPollingInterval() { return kFastPollingInterval; } @@ -67,9 +69,10 @@ class ICDManager static void OnActiveModeDone(System::Layer * aLayer, void * appState); private: - static constexpr System::Clock::Milliseconds32 kICDSitModePollingThreashold = System::Clock::Milliseconds32(15000); - static constexpr System::Clock::Milliseconds32 kSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; - static constexpr System::Clock::Milliseconds32 kFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; + // SIT ICDs should have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) + static constexpr System::Clock::Milliseconds32 kSITPollingThreshold = System::Clock::Milliseconds32(15000); + static constexpr System::Clock::Milliseconds32 kSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; + static constexpr System::Clock::Milliseconds32 kFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; // Minimal constraint value of the the ICD attributes. static constexpr uint32_t kMinIdleModeInterval = 500; @@ -79,8 +82,10 @@ class ICDManager bool SupportsCheckInProtocol(); BitFlags mKeepActiveFlags{ 0 }; - OperationalState mOperationalState = OperationalState::IdleMode; - ICDMode mIcdMode = ICDMode::SIT; + OperationalState mOperationalState = OperationalState::IdleMode; + ICDMode mICDMode = ICDMode::SIT; + PersistentStorageDelegate * mStorage = nullptr; + FabricTable * mFabricTable = nullptr; }; } // namespace app diff --git a/src/app/util/IcdMonitoringTable.cpp b/src/app/icd/IcdMonitoringTable.cpp similarity index 100% rename from src/app/util/IcdMonitoringTable.cpp rename to src/app/icd/IcdMonitoringTable.cpp diff --git a/src/app/util/IcdMonitoringTable.h b/src/app/icd/IcdMonitoringTable.h similarity index 100% rename from src/app/util/IcdMonitoringTable.h rename to src/app/icd/IcdMonitoringTable.h diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index a9853215332fd5..f0fea66cc0b16c 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -636,6 +636,7 @@ void Engine::Run() ReadHandler * readHandler = imEngine->ActiveHandlerAt(mCurReadHandlerIdx % (uint32_t) imEngine->mReadHandlers.Allocated()); VerifyOrDie(readHandler != nullptr); + // TODO (#27672): Replace with check with Report Scheduler if the read handler is reportable if (readHandler->IsReportableNow()) { mRunningReadHandler = readHandler; diff --git a/src/app/reporting/ReportScheduler.h b/src/app/reporting/ReportScheduler.h new file mode 100644 index 00000000000000..80d391c171c7e5 --- /dev/null +++ b/src/app/reporting/ReportScheduler.h @@ -0,0 +1,150 @@ +/* + * + * Copyright (c) 2023 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 +#include +#include +#include + +namespace chip { +namespace app { +namespace reporting { + +// Forward declaration of TestReportScheduler to allow it to be friend with ReportScheduler +class TestReportScheduler; + +using Timestamp = System::Clock::Timestamp; + +class ReportScheduler : public ReadHandler::Observer +{ +public: + /// @brief This class acts as an interface between the report scheduler and the system timer to reduce dependencies on the + /// system layer. + class TimerDelegate + { + public: + virtual ~TimerDelegate() {} + /// @brief Start a timer for a given context. The report scheduler must always cancel an existing timer for a context (using + /// CancelTimer) before starting a new one for that context. + /// @param context context to pass to the timer callback. + /// @param aTimeout time in miliseconds before the timer expires + virtual CHIP_ERROR StartTimer(void * context, System::Clock::Timeout aTimeout) = 0; + /// @brief Cancel a timer for a given context + /// @param context used to identify the timer to cancel + virtual void CancelTimer(void * context) = 0; + virtual bool IsTimerActive(void * context) = 0; + virtual Timestamp GetCurrentMonotonicTimestamp() = 0; + }; + + class ReadHandlerNode : public IntrusiveListNodeBase<> + { + public: + using TimerCompleteCallback = void (*)(); + + ReadHandlerNode(ReadHandler * aReadHandler, TimerDelegate * aTimerDelegate, TimerCompleteCallback aCallback) : + mTimerDelegate(aTimerDelegate), mCallback(aCallback) + { + VerifyOrDie(aReadHandler != nullptr); + VerifyOrDie(aTimerDelegate != nullptr); + VerifyOrDie(aCallback != nullptr); + + mReadHandler = aReadHandler; + SetIntervalTimeStamps(aReadHandler); + } + ReadHandler * GetReadHandler() const { return mReadHandler; } + /// @brief Check if the Node is reportable now, meaning its readhandler was made reportable by attribute dirtying and + /// handler state, and minimal time interval since last report has elapsed, or the maximal time interval since last + /// report has elapsed + bool IsReportableNow() const + { + // TODO: Add flags to allow for test to simulate waiting for the min interval or max intrval to elapse when integrating + // the scheduler in the ReadHandler + Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); + return (mReadHandler->IsGeneratingReports() && + ((now >= mMinTimestamp && mReadHandler->IsDirty()) || now >= mMaxTimestamp)); + } + + void SetIntervalTimeStamps(ReadHandler * aReadHandler) + { + uint16_t minInterval, maxInterval; + aReadHandler->GetReportingIntervals(minInterval, maxInterval); + Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); + mMinTimestamp = now + System::Clock::Seconds16(minInterval); + mMaxTimestamp = now + System::Clock::Seconds16(maxInterval); + } + + void RunCallback() { mCallback(); } + + Timestamp GetMinTimestamp() const { return mMinTimestamp; } + Timestamp GetMaxTimestamp() const { return mMaxTimestamp; } + + private: + TimerDelegate * mTimerDelegate; + TimerCompleteCallback mCallback; + ReadHandler * mReadHandler; + Timestamp mMinTimestamp; + Timestamp mMaxTimestamp; + }; + + ReportScheduler(TimerDelegate * aTimerDelegate) : mTimerDelegate(aTimerDelegate) {} + /** + * Interface to act on changes in the ReadHandler reportability + */ + virtual ~ReportScheduler() = default; + + /// @brief Check if a ReadHandler is scheduled for reporting + virtual bool IsReportScheduled(ReadHandler * aReadHandler) = 0; + /// @brief Check whether a ReadHandler is reportable right now, taking into account its minimum and maximum intervals. + /// @param aReadHandler read handler to check + bool IsReportableNow(ReadHandler * aReadHandler) { return FindReadHandlerNode(aReadHandler)->IsReportableNow(); }; + /// @brief Check if a ReadHandler is reportable without considering the timing + bool IsReadHandlerReportable(ReadHandler * aReadHandler) const + { + return aReadHandler->IsGeneratingReports() && aReadHandler->IsDirty(); + } + + /// @brief Get the number of ReadHandlers registered in the scheduler's node pool + size_t GetNumReadHandlers() const { return mNodesPool.Allocated(); } + +protected: + friend class chip::app::reporting::TestReportScheduler; + + /// @brief Find the ReadHandlerNode for a given ReadHandler pointer + /// @param [in] aReadHandler ReadHandler pointer to look for in the ReadHandler nodes list + /// @return Node Address if node was found, nullptr otherwise + ReadHandlerNode * FindReadHandlerNode(const ReadHandler * aReadHandler) + { + for (auto & iter : mReadHandlerList) + { + if (iter.GetReadHandler() == aReadHandler) + { + return &iter; + } + } + return nullptr; + } + + IntrusiveList mReadHandlerList; + ObjectPool mNodesPool; + TimerDelegate * mTimerDelegate; +}; +}; // namespace reporting +}; // namespace app +}; // namespace chip diff --git a/src/app/reporting/ReportSchedulerImpl.cpp b/src/app/reporting/ReportSchedulerImpl.cpp new file mode 100644 index 00000000000000..4b45ab9d1b6deb --- /dev/null +++ b/src/app/reporting/ReportSchedulerImpl.cpp @@ -0,0 +1,188 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +namespace chip { +namespace app { +namespace reporting { + +using Seconds16 = System::Clock::Seconds16; +using Milliseconds32 = System::Clock::Milliseconds32; +using Timeout = System::Clock::Timeout; +using Timestamp = System::Clock::Timestamp; +using ReadHandlerNode = ReportScheduler::ReadHandlerNode; + +/// @brief Callback called when the report timer expires to schedule an engine run regardless of the state of the ReadHandlers, as +/// the engine already verifies that read handlers are reportable before sending a report +static void ReportTimerCallback() +{ + InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); +} + +ReportSchedulerImpl::ReportSchedulerImpl(TimerDelegate * aTimerDelegate) : ReportScheduler(aTimerDelegate) +{ + VerifyOrDie(nullptr != mTimerDelegate); +} + +/// @brief When a ReadHandler is added, register it, which will schedule an engine run +void ReportSchedulerImpl::OnReadHandlerCreated(ReadHandler * aReadHandler) +{ + RegisterReadHandler(aReadHandler); +} + +/// @brief When a ReadHandler becomes reportable, schedule, verifies if the min interval of a handleris elapsed. If not, +/// reschedule the report to happen when the min interval is elapsed. If it is, schedule an engine run. +void ReportSchedulerImpl::OnBecameReportable(ReadHandler * aReadHandler) +{ + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); + VerifyOrReturn(nullptr != node); + + Milliseconds32 newTimeout; + if (node->IsReportableNow()) + { + // If the handler is reportable now, just schedule a report immediately + newTimeout = Milliseconds32(0); + } + else + { + // If the handler is not reportable now, schedule a report for the min interval + newTimeout = node->GetMinTimestamp() - mTimerDelegate->GetCurrentMonotonicTimestamp(); + } + + ScheduleReport(newTimeout, node); +} + +void ReportSchedulerImpl::OnSubscriptionAction(ReadHandler * apReadHandler) +{ + ReadHandlerNode * node = FindReadHandlerNode(apReadHandler); + VerifyOrReturn(nullptr != node); + // Schedule callback for max interval by computing the difference between the max timestamp and the current timestamp + node->SetIntervalTimeStamps(apReadHandler); + Milliseconds32 newTimeout = node->GetMaxTimestamp() - mTimerDelegate->GetCurrentMonotonicTimestamp(); + ScheduleReport(newTimeout, node); +} + +/// @brief When a ReadHandler is removed, unregister it, which will cancel any scheduled report +void ReportSchedulerImpl::OnReadHandlerDestroyed(ReadHandler * aReadHandler) +{ + UnregisterReadHandler(aReadHandler); +} + +CHIP_ERROR ReportSchedulerImpl::RegisterReadHandler(ReadHandler * aReadHandler) +{ + ReadHandlerNode * newNode = FindReadHandlerNode(aReadHandler); + // Handler must not be registered yet; it's just being constructed. + VerifyOrDie(nullptr == newNode); + // The NodePool is the same size as the ReadHandler pool from the IM Engine, so we don't need a check for size here since if a + // ReadHandler was created, space should be available. + newNode = mNodesPool.CreateObject(aReadHandler, mTimerDelegate, ReportTimerCallback); + mReadHandlerList.PushBack(newNode); + + ChipLogProgress(DataManagement, + "Registered a ReadHandler that will schedule a report between system Timestamp: %" PRIu64 + " and system Timestamp %" PRIu64 ".", + newNode->GetMinTimestamp().count(), newNode->GetMaxTimestamp().count()); + + Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); + Milliseconds32 newTimeout; + // If the handler is reportable, schedule a report for the min interval, otherwise schedule a report for the max interval + if (newNode->IsReportableNow()) + { + // If the handler is reportable now, just schedule a report immediately + newTimeout = Milliseconds32(0); + } + else if (IsReadHandlerReportable(aReadHandler) && (newNode->GetMinTimestamp() > now)) + { + // If the handler is reportable now, but the min interval is not elapsed, schedule a report for the moment the min interval + // has elapsed + newTimeout = newNode->GetMinTimestamp() - now; + } + else + { + // If the handler is not reportable now, schedule a report for the max interval + newTimeout = newNode->GetMaxTimestamp() - now; + } + + ReturnErrorOnFailure(ScheduleReport(newTimeout, newNode)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ReportSchedulerImpl::ScheduleReport(Timeout timeout, ReadHandlerNode * node) +{ + // Cancel Report if it is currently scheduled + CancelSchedulerTimer(node); + StartSchedulerTimer(node, timeout); + + return CHIP_NO_ERROR; +} + +void ReportSchedulerImpl::CancelReport(ReadHandler * aReadHandler) +{ + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); + VerifyOrReturn(nullptr != node); + CancelSchedulerTimer(node); +} + +void ReportSchedulerImpl::UnregisterReadHandler(ReadHandler * aReadHandler) +{ + CancelReport(aReadHandler); + + ReadHandlerNode * removeNode = FindReadHandlerNode(aReadHandler); + // Nothing to remove if the handler is not found in the list + VerifyOrReturn(nullptr != removeNode); + + mReadHandlerList.Remove(removeNode); + mNodesPool.ReleaseObject(removeNode); +} + +void ReportSchedulerImpl::UnregisterAllHandlers() +{ + while (!mReadHandlerList.Empty()) + { + ReadHandler * firstReadHandler = mReadHandlerList.begin()->GetReadHandler(); + UnregisterReadHandler(firstReadHandler); + } +} + +bool ReportSchedulerImpl::IsReportScheduled(ReadHandler * aReadHandler) +{ + ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); + VerifyOrReturnValue(nullptr != node, false); + return CheckSchedulerTimerActive(node); +} + +CHIP_ERROR ReportSchedulerImpl::StartSchedulerTimer(ReadHandlerNode * node, System::Clock::Timeout aTimeout) +{ + // Schedule Report + return mTimerDelegate->StartTimer(node, aTimeout); +} + +void ReportSchedulerImpl::CancelSchedulerTimer(ReadHandlerNode * node) +{ + mTimerDelegate->CancelTimer(node); +} + +bool ReportSchedulerImpl::CheckSchedulerTimerActive(ReadHandlerNode * node) +{ + return mTimerDelegate->IsTimerActive(node); +} + +} // namespace reporting +} // namespace app +} // namespace chip diff --git a/src/app/reporting/ReportSchedulerImpl.h b/src/app/reporting/ReportSchedulerImpl.h new file mode 100644 index 00000000000000..849f9b797b5f93 --- /dev/null +++ b/src/app/reporting/ReportSchedulerImpl.h @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2023 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 { +namespace reporting { + +class ReportSchedulerImpl : public ReportScheduler +{ +public: + ReportSchedulerImpl(TimerDelegate * aTimerDelegate); + ~ReportSchedulerImpl() override { UnregisterAllHandlers(); } + + // ReadHandlerObserver + void OnReadHandlerCreated(ReadHandler * aReadHandler) override; + void OnBecameReportable(ReadHandler * aReadHandler) override; + void OnSubscriptionAction(ReadHandler * aReadHandler) override; + void OnReadHandlerDestroyed(ReadHandler * aReadHandler) override; + +protected: + virtual CHIP_ERROR RegisterReadHandler(ReadHandler * aReadHandler); + virtual CHIP_ERROR ScheduleReport(System::Clock::Timeout timeout, ReadHandlerNode * node); + virtual void CancelReport(ReadHandler * aReadHandler); + virtual void UnregisterReadHandler(ReadHandler * aReadHandler); + virtual void UnregisterAllHandlers(); + +private: + friend class chip::app::reporting::TestReportScheduler; + + bool IsReportScheduled(ReadHandler * aReadHandler) override; + + /// @brief Start a timer for a given ReadHandlerNode, ensures that if a timer is already running for this node, it is cancelled + /// @param node Node of the ReadHandler list to start a timer for + /// @param aTimeout Delay before the timer expires + virtual CHIP_ERROR StartSchedulerTimer(ReadHandlerNode * node, System::Clock::Timeout aTimeout); + /// @brief Cancel the timer for a given ReadHandlerNode + virtual void CancelSchedulerTimer(ReadHandlerNode * node); + /// @brief Check if the timer for a given ReadHandlerNode is active + virtual bool CheckSchedulerTimerActive(ReadHandlerNode * node); +}; + +} // namespace reporting +} // namespace app +} // namespace chip diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 948be1e4fe6cb3..0dfa76bd6ad59b 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -249,7 +249,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT #if CHIP_CONFIG_ENABLE_ICD_SERVER - mICDManager.Init(); + mICDManager.Init(mDeviceStorage, &GetFabricTable()); mICDEventManager.Init(&mICDManager); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 22f10f9234cdcb..03834cd62bd189 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -54,18 +54,6 @@ source_set("binding-test-srcs") { ] } -source_set("icd-management-test-srcs") { - sources = [ - "${chip_root}/src/app/util/IcdMonitoringTable.cpp", - "${chip_root}/src/app/util/IcdMonitoringTable.h", - ] - - public_deps = [ - "${chip_root}/src/app/common:cluster-objects", - "${chip_root}/src/lib/core", - ] -} - source_set("ota-requestor-test-srcs") { sources = [ "${chip_root}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp", @@ -106,6 +94,15 @@ source_set("scenes-table-test-srcs") { ] } +source_set("operational-state-test-srcs") { + sources = [ "${chip_root}/src/app/clusters/operational-state-server/operational-state-delegate.h" ] + + public_deps = [ + "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/lib/core", + ] +} + chip_test_suite("tests") { output_name = "libAppTests" @@ -132,8 +129,10 @@ chip_test_suite("tests") { "TestInteractionModelEngine.cpp", "TestMessageDef.cpp", "TestNumericAttributeTraits.cpp", + "TestOperationalStateDelegate.cpp", "TestPendingNotificationMap.cpp", "TestReadInteraction.cpp", + "TestReportScheduler.cpp", "TestReportingEngine.cpp", "TestSceneTable.cpp", "TestStatusIB.cpp", @@ -171,13 +170,14 @@ chip_test_suite("tests") { public_deps = [ ":binding-test-srcs", - ":icd-management-test-srcs", + ":operational-state-test-srcs", ":ota-requestor-test-srcs", ":scenes-table-test-srcs", ":time-sync-data-provider-test-srcs", "${chip_root}/src/app", "${chip_root}/src/app/common:cluster-objects", "${chip_root}/src/app/icd:manager-srcs", + "${chip_root}/src/app/icd:monitoring-table", "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_ember", "${chip_root}/src/lib/core", diff --git a/src/app/tests/TestIcdMonitoringTable.cpp b/src/app/tests/TestIcdMonitoringTable.cpp index e87adfa3ed84d3..5cfdadd01ccbbc 100644 --- a/src/app/tests/TestIcdMonitoringTable.cpp +++ b/src/app/tests/TestIcdMonitoringTable.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include +#include #include #include #include diff --git a/src/app/tests/TestOperationalStateDelegate.cpp b/src/app/tests/TestOperationalStateDelegate.cpp new file mode 100644 index 00000000000000..a4d5dce822bc8d --- /dev/null +++ b/src/app/tests/TestOperationalStateDelegate.cpp @@ -0,0 +1,628 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +#include + +using namespace chip; +using namespace chip::DeviceLayer; +using namespace chip::app::Clusters::OperationalState; + +namespace { + +void TestStructGenericOperationalStateConstructorWithOnlyStateID(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + // General state: Stopped + GenericOperationalState operationalStateStopped(to_underlying(OperationalStateEnum::kStopped)); + NL_TEST_ASSERT(inSuite, operationalStateStopped.operationalStateID == to_underlying(OperationalStateEnum::kStopped)); + NL_TEST_ASSERT(inSuite, operationalStateStopped.operationalStateLabel.HasValue() == false); + + // General state: Running + GenericOperationalState operationalStateRunning(to_underlying(OperationalStateEnum::kRunning)); + NL_TEST_ASSERT(inSuite, operationalStateRunning.operationalStateID == to_underlying(OperationalStateEnum::kRunning)); + NL_TEST_ASSERT(inSuite, operationalStateRunning.operationalStateLabel.HasValue() == false); + + // General state: Paused + GenericOperationalState operationalStatePaused(to_underlying(OperationalStateEnum::kPaused)); + NL_TEST_ASSERT(inSuite, operationalStatePaused.operationalStateID == to_underlying(OperationalStateEnum::kPaused)); + NL_TEST_ASSERT(inSuite, operationalStatePaused.operationalStateLabel.HasValue() == false); + + // General state: Error + GenericOperationalState operationalStateError(to_underlying(OperationalStateEnum::kError)); + NL_TEST_ASSERT(inSuite, operationalStateError.operationalStateID == to_underlying(OperationalStateEnum::kError)); + NL_TEST_ASSERT(inSuite, operationalStateError.operationalStateLabel.HasValue() == false); +} + +void TestStructGenericOperationalStateConstructorWithStateIDAndStateLabel(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + + enum class ManufactureOperationalStateEnum : uint8_t + { + kRebooting = 0x81, + }; + + char buffer[kOperationalStateLabelMaxSize] = "rebooting"; + + // ManufacturerStates state, label len = 9: + GenericOperationalState operationalState(to_underlying(ManufactureOperationalStateEnum::kRebooting), + Optional(CharSpan::fromCharString(buffer))); + + NL_TEST_ASSERT(inSuite, operationalState.operationalStateID == to_underlying(ManufactureOperationalStateEnum::kRebooting)); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.Value().size() == strlen(buffer)); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalState.operationalStateLabel.Value().data()), buffer, strlen(buffer)) == 0); +} + +void TestStructGenericOperationalStateCopyConstructor(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + + enum class ManufactureOperationalStateEnum : uint8_t + { + kRebooting = 0x81, + }; + + char buffer[kOperationalStateLabelMaxSize] = "rebooting"; + + GenericOperationalState srcOperationalState(to_underlying(ManufactureOperationalStateEnum::kRebooting), + Optional(CharSpan::fromCharString(buffer))); + + GenericOperationalState desOperationalState(srcOperationalState); + + NL_TEST_ASSERT(inSuite, desOperationalState.operationalStateID == srcOperationalState.operationalStateID); + NL_TEST_ASSERT(inSuite, desOperationalState.operationalStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, + desOperationalState.operationalStateLabel.Value().size() == + srcOperationalState.operationalStateLabel.Value().size()); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(desOperationalState.operationalStateLabel.Value().data()), + const_cast(srcOperationalState.operationalStateLabel.Value().data()), + desOperationalState.operationalStateLabel.Value().size()) == 0); +} + +void TestStructGenericOperationalStateCopyAssignment(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + + enum class ManufactureOperationalStateEnum : uint8_t + { + kRebooting = 0x81, + }; + + char buffer[kOperationalStateLabelMaxSize] = "rebooting"; + + GenericOperationalState srcOperationalState(to_underlying(ManufactureOperationalStateEnum::kRebooting), + Optional(CharSpan::fromCharString(buffer))); + + GenericOperationalState desOperationalState = srcOperationalState; + + NL_TEST_ASSERT(inSuite, desOperationalState.operationalStateID == srcOperationalState.operationalStateID); + NL_TEST_ASSERT(inSuite, desOperationalState.operationalStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, + desOperationalState.operationalStateLabel.Value().size() == + srcOperationalState.operationalStateLabel.Value().size()); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(desOperationalState.operationalStateLabel.Value().data()), + const_cast(srcOperationalState.operationalStateLabel.Value().data()), + desOperationalState.operationalStateLabel.Value().size()) == 0); +} + +void TestStructGenericOperationalStateFuncSet(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + + enum class ManufactureOperationalStateEnum : uint8_t + { + kRebooting = 0x81, + }; + + char buffer[kOperationalStateLabelMaxSize] = "rebooting"; + + // init state + GenericOperationalState operationalState(to_underlying(ManufactureOperationalStateEnum::kRebooting), + Optional(CharSpan::fromCharString(buffer))); + + // change state without label + operationalState.Set(to_underlying(OperationalStateEnum::kStopped)); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateID == to_underlying(OperationalStateEnum::kStopped)); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.HasValue() == false); + + // change state with label + operationalState.Set(to_underlying(ManufactureOperationalStateEnum::kRebooting), + Optional(CharSpan::fromCharString(buffer))); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateID == to_underlying(ManufactureOperationalStateEnum::kRebooting)); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.Value().size() == strlen(buffer)); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalState.operationalStateLabel.Value().data()), buffer, strlen(buffer)) == 0); + + // change state with label, label len = kOperationalStateLabelMaxSize + for (size_t i = 0; i < sizeof(buffer); i++) + { + buffer[i] = 1; + } + operationalState.Set(to_underlying(ManufactureOperationalStateEnum::kRebooting), + Optional(CharSpan(buffer, sizeof(buffer)))); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateID == to_underlying(ManufactureOperationalStateEnum::kRebooting)); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.Value().size() == sizeof(buffer)); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalState.operationalStateLabel.Value().data()), buffer, sizeof(buffer)) == 0); + + // change state with label, label len larger than kOperationalStateLabelMaxSize + char buffer2[kOperationalStateLabelMaxSize + 1]; + + for (size_t i = 0; i < sizeof(buffer2); i++) + { + buffer2[i] = 1; + } + operationalState.Set(to_underlying(ManufactureOperationalStateEnum::kRebooting), + Optional(CharSpan(buffer2, sizeof(buffer2)))); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateID == to_underlying(ManufactureOperationalStateEnum::kRebooting)); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalState.operationalStateLabel.Value().size() == kOperationalStateLabelMaxSize); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalState.operationalStateLabel.Value().data()), buffer2, + kOperationalStateLabelMaxSize) == 0); +} + +void TestStructGenericOperationalErrorConstructorWithOnlyStateID(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + // General errors: NoError + GenericOperationalError operationalErrorNoErr(to_underlying(ErrorStateEnum::kNoError)); + + NL_TEST_ASSERT(inSuite, operationalErrorNoErr.errorStateID == to_underlying(ErrorStateEnum::kNoError)); + NL_TEST_ASSERT(inSuite, operationalErrorNoErr.errorStateLabel.HasValue() == false); + NL_TEST_ASSERT(inSuite, operationalErrorNoErr.errorStateDetails.HasValue() == false); + + // General errors: UnableToStartOrResume + GenericOperationalError operationalErrorUnableToStartOrResume(to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + + NL_TEST_ASSERT(inSuite, + operationalErrorUnableToStartOrResume.errorStateID == to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + NL_TEST_ASSERT(inSuite, operationalErrorUnableToStartOrResume.errorStateLabel.HasValue() == false); + NL_TEST_ASSERT(inSuite, operationalErrorUnableToStartOrResume.errorStateDetails.HasValue() == false); + + // General errors: UnableToCompleteOperation + GenericOperationalError operationalErrorkUnableToCompleteOperation(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + + NL_TEST_ASSERT(inSuite, + operationalErrorkUnableToCompleteOperation.errorStateID == + to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + NL_TEST_ASSERT(inSuite, operationalErrorkUnableToCompleteOperation.errorStateLabel.HasValue() == false); + NL_TEST_ASSERT(inSuite, operationalErrorkUnableToCompleteOperation.errorStateDetails.HasValue() == false); + + // General errors: CommandInvalidInState + GenericOperationalError operationalErrorCommandInvalidInState(to_underlying(ErrorStateEnum::kCommandInvalidInState)); + + NL_TEST_ASSERT(inSuite, + operationalErrorCommandInvalidInState.errorStateID == to_underlying(ErrorStateEnum::kCommandInvalidInState)); + NL_TEST_ASSERT(inSuite, operationalErrorCommandInvalidInState.errorStateLabel.HasValue() == false); + NL_TEST_ASSERT(inSuite, operationalErrorCommandInvalidInState.errorStateDetails.HasValue() == false); +} + +void TestStructGenericOperationalErrorConstructorWithStateIDAndStateLabel(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + + enum class ManufactureOperationalErrorEnum : uint8_t + { + kLowBattery = 0x81, + }; + + char labelBuffer[kOperationalErrorLabelMaxSize] = "low battery"; + + // ManufacturerStates error with label, label len = 11: + GenericOperationalError operationalError(to_underlying(ManufactureOperationalErrorEnum::kLowBattery), + Optional(CharSpan::fromCharString(labelBuffer))); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ManufactureOperationalErrorEnum::kLowBattery)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.Value().size() == strlen(labelBuffer)); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalError.errorStateLabel.Value().data()), labelBuffer, strlen(labelBuffer)) == + 0); + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == false); +} + +void TestStructGenericOperationalErrorConstructorWithFullParam(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + + enum class ManufactureOperationalErrorEnum : uint8_t + { + kLowBattery = 0x81, + }; + + // ManufacturerStates error with label(label len = 11) and detail (len = 25): + char labelBuffer[kOperationalErrorLabelMaxSize] = "low battery"; + char detailBuffer[kOperationalErrorDetailsMaxSize] = "Please plug in for charge"; + + GenericOperationalError operationalError(to_underlying(ManufactureOperationalErrorEnum::kLowBattery), + Optional(CharSpan::fromCharString(labelBuffer)), + Optional(CharSpan::fromCharString(detailBuffer))); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ManufactureOperationalErrorEnum::kLowBattery)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.Value().size() == strlen(labelBuffer)); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalError.errorStateLabel.Value().data()), labelBuffer, strlen(labelBuffer)) == + 0); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.Value().size() == strlen(detailBuffer)); + NL_TEST_ASSERT( + inSuite, + memcmp(const_cast(operationalError.errorStateDetails.Value().data()), detailBuffer, strlen(detailBuffer)) == 0); +} + +void TestStructGenericOperationalErrorCopyConstructor(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + + enum class ManufactureOperationalErrorEnum : uint8_t + { + kLowBattery = 0x81, + }; + + // ManufacturerStates error with label(label len = 11) and detail (len = 25): + char labelBuffer[kOperationalErrorLabelMaxSize] = "low battery"; + char detailBuffer[kOperationalErrorDetailsMaxSize] = "Please plug in for charge"; + + GenericOperationalError srcOperationalError(to_underlying(ManufactureOperationalErrorEnum::kLowBattery), + Optional(CharSpan::fromCharString(labelBuffer)), + Optional(CharSpan::fromCharString(detailBuffer))); + + // call copy constructor + GenericOperationalError desOperationalError(srcOperationalError); + NL_TEST_ASSERT(inSuite, desOperationalError.errorStateID == srcOperationalError.errorStateID); + NL_TEST_ASSERT(inSuite, desOperationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, + desOperationalError.errorStateLabel.Value().size() == srcOperationalError.errorStateLabel.Value().size()); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(desOperationalError.errorStateLabel.Value().data()), + const_cast(srcOperationalError.errorStateLabel.Value().data()), + desOperationalError.errorStateLabel.Value().size()) == 0); + + NL_TEST_ASSERT(inSuite, desOperationalError.errorStateDetails.HasValue() == true); + NL_TEST_ASSERT(inSuite, + desOperationalError.errorStateDetails.Value().size() == srcOperationalError.errorStateDetails.Value().size()); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(desOperationalError.errorStateDetails.Value().data()), + const_cast(srcOperationalError.errorStateDetails.Value().data()), + desOperationalError.errorStateDetails.Value().size()) == 0); +} + +void TestStructGenericOperationalErrorCopyAssignment(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + + enum class ManufactureOperationalErrorEnum : uint8_t + { + kLowBattery = 0x81, + }; + + // ManufacturerStates error with label(label len = 11) and detail (len = 25): + char labelBuffer[kOperationalErrorLabelMaxSize] = "low battery"; + char detailBuffer[kOperationalErrorDetailsMaxSize] = "Please plug in for charge"; + + GenericOperationalError srcOperationalError(to_underlying(ManufactureOperationalErrorEnum::kLowBattery), + Optional(CharSpan::fromCharString(labelBuffer)), + Optional(CharSpan::fromCharString(detailBuffer))); + + // call copy assignment + GenericOperationalError desOperationalError = srcOperationalError; + NL_TEST_ASSERT(inSuite, desOperationalError.errorStateID == srcOperationalError.errorStateID); + NL_TEST_ASSERT(inSuite, desOperationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, + desOperationalError.errorStateLabel.Value().size() == srcOperationalError.errorStateLabel.Value().size()); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(desOperationalError.errorStateLabel.Value().data()), + const_cast(srcOperationalError.errorStateLabel.Value().data()), + desOperationalError.errorStateLabel.Value().size()) == 0); + + NL_TEST_ASSERT(inSuite, desOperationalError.errorStateDetails.HasValue() == true); + NL_TEST_ASSERT(inSuite, + desOperationalError.errorStateDetails.Value().size() == srcOperationalError.errorStateDetails.Value().size()); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(desOperationalError.errorStateDetails.Value().data()), + const_cast(srcOperationalError.errorStateDetails.Value().data()), + desOperationalError.errorStateDetails.Value().size()) == 0); +} + +void TestStructGenericOperationalErrorFuncSet(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app::Clusters::OperationalState; + enum class ManufactureOperationalErrorEnum : uint8_t + { + kLowBattery = 0x81, + }; + + // ManufacturerStates error with label(label len = 11) and detail (len = 25): + char labelBuffer[kOperationalErrorLabelMaxSize] = "low battery"; + char detailBuffer[kOperationalErrorDetailsMaxSize] = "Please plug in for charge"; + + // General errors: NoError + GenericOperationalError operationalError(to_underlying(ErrorStateEnum::kNoError)); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ErrorStateEnum::kNoError)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == false); + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == false); + + // call Set with stateId + operationalError.Set(to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == false); + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == false); + + // call Set with stateId and StateLabel + operationalError.Set(to_underlying(ErrorStateEnum::kUnableToStartOrResume), + Optional(CharSpan::fromCharString(labelBuffer))); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.Value().size() == strlen(labelBuffer)); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalError.errorStateLabel.Value().data()), labelBuffer, strlen(labelBuffer)) == + 0); + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == false); + + // call Set with stateId, StateLabel and StateDetails + operationalError.Set(to_underlying(ErrorStateEnum::kUnableToStartOrResume), + Optional(CharSpan::fromCharString(labelBuffer)), + Optional(CharSpan::fromCharString(detailBuffer))); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.Value().size() == strlen(labelBuffer)); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalError.errorStateLabel.Value().data()), labelBuffer, strlen(labelBuffer)) == + 0); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.Value().size() == strlen(detailBuffer)); + NL_TEST_ASSERT( + inSuite, + memcmp(const_cast(operationalError.errorStateDetails.Value().data()), detailBuffer, strlen(detailBuffer)) == 0); + + // change state with label, label len = kOperationalStateLabelMaxSize + for (size_t i = 0; i < sizeof(labelBuffer); i++) + { + labelBuffer[i] = 1; + } + operationalError.Set(to_underlying(ErrorStateEnum::kUnableToStartOrResume), + Optional(CharSpan(labelBuffer, sizeof(labelBuffer)))); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.Value().size() == sizeof(labelBuffer)); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalError.errorStateLabel.Value().data()), labelBuffer, sizeof(labelBuffer)) == + 0); + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == false); + + // change state with label, label len = kOperationalStateLabelMaxSize + 1 + char labelBuffer2[kOperationalErrorLabelMaxSize + 1]; + for (size_t i = 0; i < sizeof(labelBuffer2); i++) + { + labelBuffer2[i] = 2; + } + operationalError.Set(to_underlying(ErrorStateEnum::kUnableToStartOrResume), + Optional(CharSpan(labelBuffer2, sizeof(labelBuffer2)))); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.Value().size() == kOperationalErrorLabelMaxSize); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalError.errorStateLabel.Value().data()), labelBuffer2, + kOperationalErrorLabelMaxSize) == 0); + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == false); + + // change state with label and details, details len = kOperationalErrorDetailsMaxSize + 1 + char detailBuffer2[kOperationalErrorDetailsMaxSize + 1]; + for (size_t i = 0; i < sizeof(detailBuffer2); i++) + { + detailBuffer2[i] = 3; + } + operationalError.Set(to_underlying(ErrorStateEnum::kUnableToStartOrResume), + Optional(CharSpan(labelBuffer2, sizeof(labelBuffer2))), + Optional(CharSpan(detailBuffer2, sizeof(detailBuffer2)))); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateID == to_underlying(ErrorStateEnum::kUnableToStartOrResume)); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.HasValue() == true); + NL_TEST_ASSERT(inSuite, operationalError.errorStateLabel.Value().size() == kOperationalErrorLabelMaxSize); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalError.errorStateLabel.Value().data()), labelBuffer2, + kOperationalErrorLabelMaxSize) == 0); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.HasValue() == true); + + NL_TEST_ASSERT(inSuite, operationalError.errorStateDetails.Value().size() == kOperationalErrorDetailsMaxSize); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(operationalError.errorStateDetails.Value().data()), detailBuffer2, + kOperationalErrorDetailsMaxSize) == 0); +} + +void TestStructGenericOperationalPhaseConstructor(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app; + using namespace chip::app::Clusters::OperationalState; + + GenericOperationalPhase phase = GenericOperationalPhase(DataModel::Nullable()); + NL_TEST_ASSERT(inSuite, phase.IsMissing() == true); + + char phaseBuffer[kOperationalPhaseNameMaxSize] = "start"; + GenericOperationalPhase phase2(DataModel::Nullable(CharSpan::fromCharString(phaseBuffer))); + NL_TEST_ASSERT(inSuite, phase2.IsMissing() == false); + NL_TEST_ASSERT(inSuite, phase2.mPhaseName.Value().size() == strlen(phaseBuffer)); + NL_TEST_ASSERT(inSuite, memcmp(const_cast(phase2.mPhaseName.Value().data()), phaseBuffer, strlen(phaseBuffer)) == 0); +} + +void TestStructGenericOperationalPhaseCopyConstructor(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app; + using namespace chip::app::Clusters::OperationalState; + + char phaseBuffer[kOperationalPhaseNameMaxSize] = "start"; + GenericOperationalPhase phase(DataModel::Nullable(CharSpan::fromCharString(phaseBuffer))); + + GenericOperationalPhase phase2(phase); + + NL_TEST_ASSERT(inSuite, phase2.IsMissing() == false); + NL_TEST_ASSERT(inSuite, phase2.mPhaseName.Value().size() == phase.mPhaseName.Value().size()); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(phase2.mPhaseName.Value().data()), const_cast(phase.mPhaseName.Value().data()), + phase.mPhaseName.Value().size()) == 0); +} + +void TestStructGenericOperationalPhaseCopyAssignment(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app; + using namespace chip::app::Clusters::OperationalState; + + // copy assignment with null-name + GenericOperationalPhase phase = GenericOperationalPhase(DataModel::Nullable()); + NL_TEST_ASSERT(inSuite, phase.IsMissing() == true); + + // copy assignment with name + char phaseBuffer[kOperationalPhaseNameMaxSize] = "start"; + GenericOperationalPhase phase2(DataModel::Nullable(CharSpan::fromCharString(phaseBuffer))); + phase = phase2; + + NL_TEST_ASSERT(inSuite, phase.IsMissing() == false); + NL_TEST_ASSERT(inSuite, phase.mPhaseName.Value().size() == phase2.mPhaseName.Value().size()); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(phase.mPhaseName.Value().data()), const_cast(phase2.mPhaseName.Value().data()), + phase.mPhaseName.Value().size()) == 0); + + // copy assignment with name, name's len = kOperationalPhaseNameMaxSize + for (size_t i = 0; i < sizeof(phaseBuffer); i++) + { + phaseBuffer[i] = 1; + } + phase = GenericOperationalPhase(DataModel::Nullable(CharSpan(phaseBuffer, sizeof(phaseBuffer)))); + + NL_TEST_ASSERT(inSuite, phase.IsMissing() == false); + NL_TEST_ASSERT(inSuite, phase.mPhaseName.Value().size() == sizeof(phaseBuffer)); + NL_TEST_ASSERT(inSuite, memcmp(const_cast(phase.mPhaseName.Value().data()), phaseBuffer, sizeof(phaseBuffer)) == 0); + + // copy assignment with name, name's len = kOperationalPhaseNameMaxSize + 1 + char phaseBuffer2[kOperationalPhaseNameMaxSize + 1]; + for (size_t i = 0; i < sizeof(phaseBuffer2); i++) + { + phaseBuffer2[i] = 2; + } + phase = GenericOperationalPhase(DataModel::Nullable(CharSpan(phaseBuffer2, sizeof(phaseBuffer2)))); + + NL_TEST_ASSERT(inSuite, phase.IsMissing() == false); + NL_TEST_ASSERT(inSuite, phase.mPhaseName.Value().size() == kOperationalPhaseNameMaxSize); + NL_TEST_ASSERT(inSuite, + memcmp(const_cast(phase.mPhaseName.Value().data()), phaseBuffer2, kOperationalPhaseNameMaxSize) == 0); +} + +void TestStructGenericOperationalCompletionConstructor(nlTestSuite * inSuite, void * inContext) +{ + using namespace chip::app; + using namespace chip::app::Clusters::OperationalState; + + // completion with only CompletionErrorCode + GenericOperationCompletion genericOperationCompletion(to_underlying(OperationalStateEnum::kError)); + NL_TEST_ASSERT(inSuite, genericOperationCompletion.completionErrorCode == to_underlying(OperationalStateEnum::kError)); + NL_TEST_ASSERT(inSuite, genericOperationCompletion.totalOperationalTime.HasValue() == false); + NL_TEST_ASSERT(inSuite, genericOperationCompletion.pausedTime.HasValue() == false); + + // completion with errorCode and TotalOperationalTime + uint32_t kTotalOperationalTime = 500; + GenericOperationCompletion genericOperationCompletion2( + to_underlying(OperationalStateEnum::kError), + Optional>(DataModel::Nullable(kTotalOperationalTime))); + NL_TEST_ASSERT(inSuite, genericOperationCompletion2.completionErrorCode == to_underlying(OperationalStateEnum::kError)); + + NL_TEST_ASSERT(inSuite, genericOperationCompletion2.totalOperationalTime.HasValue() == true); + NL_TEST_ASSERT(inSuite, genericOperationCompletion2.totalOperationalTime.Value().Value() == kTotalOperationalTime); + NL_TEST_ASSERT(inSuite, genericOperationCompletion2.pausedTime.HasValue() == false); + + // completion with errorCode, TotalOperationalTime and PausedTime + uint32_t kPausedTime = 2000; + GenericOperationCompletion genericOperationCompletion3( + to_underlying(OperationalStateEnum::kError), + Optional>(DataModel::Nullable(kTotalOperationalTime)), + Optional>(DataModel::Nullable(kPausedTime))); + NL_TEST_ASSERT(inSuite, genericOperationCompletion3.completionErrorCode == to_underlying(OperationalStateEnum::kError)); + + NL_TEST_ASSERT(inSuite, genericOperationCompletion3.totalOperationalTime.HasValue() == true); + NL_TEST_ASSERT(inSuite, genericOperationCompletion3.totalOperationalTime.Value().Value() == kTotalOperationalTime); + NL_TEST_ASSERT(inSuite, genericOperationCompletion3.pausedTime.HasValue() == true); + NL_TEST_ASSERT(inSuite, genericOperationCompletion3.pausedTime.Value().Value() == kPausedTime); +} + +const nlTest sTests[] = { + NL_TEST_DEF("Test struct GenericOperationalState: constructor with only StateID", + TestStructGenericOperationalStateConstructorWithOnlyStateID), + NL_TEST_DEF("Test struct GenericOperationalState: constructor with StateID and StateLabel", + TestStructGenericOperationalStateConstructorWithStateIDAndStateLabel), + NL_TEST_DEF("Test struct GenericOperationalState: copy constructor", TestStructGenericOperationalStateCopyConstructor), + NL_TEST_DEF("Test struct GenericOperationalState: copy assignment", TestStructGenericOperationalStateCopyAssignment), + NL_TEST_DEF("Test struct GenericOperationalState: member function 'Set'", TestStructGenericOperationalStateFuncSet), + NL_TEST_DEF("Test struct GenericOperationalError: constructor with only StateID", + TestStructGenericOperationalErrorConstructorWithOnlyStateID), + NL_TEST_DEF("Test struct GenericOperationalError: constructor with StateID and StateLabel", + TestStructGenericOperationalErrorConstructorWithStateIDAndStateLabel), + NL_TEST_DEF("Test struct GenericOperationalError: constructor with StateID, StateLabel and StateDetail", + TestStructGenericOperationalErrorConstructorWithFullParam), + NL_TEST_DEF("Test struct GenericOperationalError: copy constructor", TestStructGenericOperationalErrorCopyConstructor), + NL_TEST_DEF("Test struct GenericOperationalError: copy assignment", TestStructGenericOperationalErrorCopyAssignment), + NL_TEST_DEF("Test struct GenericOperationalError: member function 'Set'", TestStructGenericOperationalErrorFuncSet), + NL_TEST_DEF("Test struct GenericOperationalPhase: constructor", TestStructGenericOperationalPhaseConstructor), + NL_TEST_DEF("Test struct GenericOperationalPhase: copy constructor", TestStructGenericOperationalPhaseCopyConstructor), + NL_TEST_DEF("Test struct GenericOperationalPhase: copy assignment", TestStructGenericOperationalPhaseCopyAssignment), + NL_TEST_DEF("Test struct GenericOperationalCompletion: constructor", TestStructGenericOperationalCompletionConstructor), + NL_TEST_SENTINEL() +}; + +int TestSetup(void * inContext) +{ + VerifyOrReturnError(CHIP_NO_ERROR == chip::Platform::MemoryInit(), FAILURE); + return SUCCESS; +} + +int TestTearDown(void * inContext) +{ + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +} // namespace + +int TestOperationalStateDelegate() +{ + nlTestSuite theSuite = { "Test Operational State delegate tests", &sTests[0], TestSetup, TestTearDown }; + + // Run test suit againt one context. + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestOperationalStateDelegate) diff --git a/src/app/tests/TestReportScheduler.cpp b/src/app/tests/TestReportScheduler.cpp new file mode 100644 index 00000000000000..a24422010c47c9 --- /dev/null +++ b/src/app/tests/TestReportScheduler.cpp @@ -0,0 +1,423 @@ +/* + * + * Copyright (c) 2023 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +namespace { + +class TestContext : public chip::Test::AppContext +{ +public: + static int Initialize(void * context) + { + if (AppContext::Initialize(context) != SUCCESS) + return FAILURE; + + auto * ctx = static_cast(context); + + if (ctx->mEventCounter.Init(0) != CHIP_NO_ERROR) + { + return FAILURE; + } + + return SUCCESS; + } + + static int Finalize(void * context) + { + chip::app::EventManagement::DestroyEventManagement(); + + if (AppContext::Finalize(context) != SUCCESS) + return FAILURE; + + return SUCCESS; + } + +private: + chip::MonotonicallyIncreasingCounter mEventCounter; +}; + +class NullReadHandlerCallback : public chip::app::ReadHandler::ManagementCallback +{ +public: + void OnDone(chip::app::ReadHandler & apReadHandlerObj) override {} + chip::app::ReadHandler::ApplicationCallback * GetAppCallback() override { return nullptr; } +}; + +} // namespace + +namespace chip { +namespace app { +namespace reporting { + +using InteractionModelEngine = InteractionModelEngine; +using ReportScheduler = reporting::ReportScheduler; +using ReportSchedulerImpl = reporting::ReportSchedulerImpl; +using ReadHandlerNode = reporting::ReportScheduler::ReadHandlerNode; +using Milliseconds64 = System::Clock::Milliseconds64; + +static const size_t kNumMaxReadHandlers = 16; + +class TestTimerDelegate : public ReportScheduler::TimerDelegate +{ +public: + struct NodeTimeoutPair + { + ReadHandlerNode * node; + System::Clock::Timeout timeout; + }; + + NodeTimeoutPair mPairArray[kNumMaxReadHandlers]; + size_t mPairArraySize = 0; + System::Clock::Timestamp mMockSystemTimestamp = System::Clock::Milliseconds64(0); + + NodeTimeoutPair * FindPair(ReadHandlerNode * node, size_t & position) + { + for (size_t i = 0; i < mPairArraySize; i++) + { + if (mPairArray[i].node == node) + { + position = i; + return &mPairArray[i]; + } + } + return nullptr; + } + + CHIP_ERROR insertPair(ReadHandlerNode * node, System::Clock::Timeout timeout) + { + VerifyOrReturnError(mPairArraySize < kNumMaxReadHandlers, CHIP_ERROR_NO_MEMORY); + mPairArray[mPairArraySize].node = node; + mPairArray[mPairArraySize].timeout = timeout; + mPairArraySize++; + + return CHIP_NO_ERROR; + } + + void removePair(ReadHandlerNode * node) + { + size_t position; + NodeTimeoutPair * pair = FindPair(node, position); + VerifyOrReturn(pair != nullptr); + + size_t nextPos = static_cast(position + 1); + size_t moveNum = static_cast(mPairArraySize - nextPos); + + // Compress array after removal, if the removed position is not the last + if (moveNum) + { + memmove(&mPairArray[position], &mPairArray[nextPos], sizeof(NodeTimeoutPair) * moveNum); + } + + mPairArraySize--; + } + + static void TimerCallbackInterface(System::Layer * aLayer, void * aAppState) + { + // Normaly we would call the callback here, thus scheduling an engine run, but we don't need it for this test as we simulate + // all the callbacks related to report emissions. The actual callback should look like this: + // + // ReadHandlerNode * node = static_cast(aAppState); + // node->RunCallback(); + ChipLogProgress(DataManagement, "Simluating engine run for Handler: %p", aAppState); + } + virtual CHIP_ERROR StartTimer(void * context, System::Clock::Timeout aTimeout) override + { + return insertPair(static_cast(context), aTimeout + mMockSystemTimestamp); + } + virtual void CancelTimer(void * context) override { removePair(static_cast(context)); } + virtual bool IsTimerActive(void * context) override + { + size_t position; + NodeTimeoutPair * pair = FindPair(static_cast(context), position); + VerifyOrReturnValue(pair != nullptr, false); + + return pair->timeout > mMockSystemTimestamp; + } + + virtual System::Clock::Timestamp GetCurrentMonotonicTimestamp() override { return mMockSystemTimestamp; } + + void SetMockSystemTimestamp(System::Clock::Timestamp aMockTimestamp) { mMockSystemTimestamp = aMockTimestamp; } + + // Increment the mock timestamp one milisecond at a time for a total of aTime miliseconds. Checks if + void IncrementMockTimestamp(System::Clock::Milliseconds64 aTime) + { + mMockSystemTimestamp = mMockSystemTimestamp + aTime; + for (size_t i = 0; i < mPairArraySize; i++) + { + if (mPairArray[i].timeout <= mMockSystemTimestamp) + { + TimerCallbackInterface(nullptr, mPairArray[i].node); + } + } + } +}; + +TestTimerDelegate sTestTimerDelegate; +ReportSchedulerImpl sScheduler(&sTestTimerDelegate); + +class TestReportScheduler +{ +public: + static void TestReadHandlerList(nlTestSuite * aSuite, void * aContext) + { + TestContext & ctx = *static_cast(aContext); + NullReadHandlerCallback nullCallback; + // exchange context + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + // Read handler pool + ObjectPool readHandlerPool; + + // Initialize mock timestamp + sTestTimerDelegate.SetMockSystemTimestamp(Milliseconds64(0)); + + for (size_t i = 0; i < kNumMaxReadHandlers; i++) + { + ReadHandler * readHandler = + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + NL_TEST_ASSERT(aSuite, nullptr != readHandler); + VerifyOrReturn(nullptr != readHandler); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == sScheduler.RegisterReadHandler(readHandler)); + NL_TEST_ASSERT(aSuite, nullptr != sScheduler.FindReadHandlerNode(readHandler)); + } + + NL_TEST_ASSERT(aSuite, readHandlerPool.Allocated() == kNumMaxReadHandlers); + NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == kNumMaxReadHandlers); + NL_TEST_ASSERT(aSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 1); + + // Test unregister first ReadHandler + ReadHandler * firstReadHandler = sScheduler.mReadHandlerList.begin()->GetReadHandler(); + sScheduler.UnregisterReadHandler(firstReadHandler); + NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == kNumMaxReadHandlers - 1); + NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(firstReadHandler)); + + // Test unregister middle ReadHandler + auto iter = sScheduler.mReadHandlerList.begin(); + for (size_t i = 0; i < static_cast(kNumMaxReadHandlers / 2); i++) + { + iter++; + } + ReadHandler * middleReadHandler = iter->GetReadHandler(); + sScheduler.UnregisterReadHandler(middleReadHandler); + NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == kNumMaxReadHandlers - 2); + NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(middleReadHandler)); + + // Test unregister last ReadHandler + iter = sScheduler.mReadHandlerList.end(); + iter--; + ReadHandler * lastReadHandler = iter->GetReadHandler(); + sScheduler.UnregisterReadHandler(lastReadHandler); + NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == kNumMaxReadHandlers - 3); + NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(lastReadHandler)); + + sScheduler.UnregisterAllHandlers(); + // Confirm all ReadHandlers are unregistered from the scheduler + NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == 0); + readHandlerPool.ForEachActiveObject([&](ReadHandler * handler) { + NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(handler)); + return Loop::Continue; + }); + + readHandlerPool.ReleaseAll(); + exchangeCtx->Close(); + NL_TEST_ASSERT(aSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } + + static void TestReportTiming(nlTestSuite * aSuite, void * aContext) + { + TestContext & ctx = *static_cast(aContext); + NullReadHandlerCallback nullCallback; + // exchange context + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + // Read handler pool + ObjectPool readHandlerPool; + + // Initialize mock timestamp + sTestTimerDelegate.SetMockSystemTimestamp(Milliseconds64(0)); + + // Dirty read handler, will be triggered at min interval + ReadHandler * readHandler1 = + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler1->SetMaxReportingInterval(2)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler1->SetMinReportingIntervalForTests(1)); + // Do those manually to avoid scheduling an engine run + readHandler1->mFlags.Set(ReadHandler::ReadHandlerFlags::ForceDirty, true); + readHandler1->mState = ReadHandler::HandlerState::GeneratingReports; + + // Clean read handler, will be triggered at max interval + ReadHandler * readHandler2 = + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler2->SetMaxReportingInterval(3)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler2->SetMinReportingIntervalForTests(0)); + // Do those manually to avoid scheduling an engine run + readHandler2->mState = ReadHandler::HandlerState::GeneratingReports; + + // Clean read handler, will be triggered at max interval, but will be cancelled before + ReadHandler * readHandler3 = + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler3->SetMaxReportingInterval(3)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler3->SetMinReportingIntervalForTests(0)); + // Do those manually to avoid scheduling an engine run + readHandler3->mState = ReadHandler::HandlerState::GeneratingReports; + + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == sScheduler.RegisterReadHandler(readHandler1)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == sScheduler.RegisterReadHandler(readHandler2)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == sScheduler.RegisterReadHandler(readHandler3)); + + // Confirms that none of the ReadHandlers are currently reportable + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportableNow(readHandler1)); + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportableNow(readHandler2)); + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportableNow(readHandler3)); + + // Simulate system clock increment + sTestTimerDelegate.IncrementMockTimestamp(Milliseconds64(1100)); + + // Checks that the first ReadHandler is reportable after 1 second since it is dirty and min interval has expired + NL_TEST_ASSERT(aSuite, sScheduler.IsReportableNow(readHandler1)); + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportableNow(readHandler2)); + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportableNow(readHandler3)); + + NL_TEST_ASSERT(aSuite, sScheduler.IsReportScheduled(readHandler3)); + sScheduler.CancelReport(readHandler3); + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportScheduled(readHandler3)); + + // Simulate system clock increment + sTestTimerDelegate.IncrementMockTimestamp(Milliseconds64(2000)); + + // Checks that all ReadHandlers are reportable + NL_TEST_ASSERT(aSuite, sScheduler.IsReportableNow(readHandler1)); + NL_TEST_ASSERT(aSuite, sScheduler.IsReportableNow(readHandler2)); + // Even if its timer got cancelled, readHandler3 should still be considered reportable as the max interval has expired + // and it is in generating report state + NL_TEST_ASSERT(aSuite, sScheduler.IsReportableNow(readHandler3)); + + sScheduler.UnregisterAllHandlers(); + readHandlerPool.ReleaseAll(); + exchangeCtx->Close(); + NL_TEST_ASSERT(aSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } + + static void TestObserverCallbacks(nlTestSuite * aSuite, void * aContext) + { + TestContext & ctx = *static_cast(aContext); + NullReadHandlerCallback nullCallback; + // exchange context + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + // Read handler pool + ObjectPool readHandlerPool; + + // Initialize mock timestamp + sTestTimerDelegate.SetMockSystemTimestamp(Milliseconds64(0)); + + ReadHandler * readHandler = + readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler->SetMaxReportingInterval(2)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == readHandler->SetMinReportingIntervalForTests(1)); + // Do those manually to avoid scheduling an engine run + readHandler->mState = ReadHandler::HandlerState::GeneratingReports; + readHandler->SetObserver(&sScheduler); + + // Test OnReadHandlerCreated + readHandler->mObserver->OnReadHandlerCreated(readHandler); + // Should have registered the read handler in the scheduler and scheduled a report + NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == 1); + NL_TEST_ASSERT(aSuite, sScheduler.IsReportScheduled(readHandler)); + ReadHandlerNode * node = sScheduler.FindReadHandlerNode(readHandler); + NL_TEST_ASSERT(aSuite, nullptr != node); + VerifyOrReturn(nullptr != node); + NL_TEST_ASSERT(aSuite, node->GetReadHandler() == readHandler); + + // Test OnBecameReportable + readHandler->mFlags.Set(ReadHandler::ReadHandlerFlags::ForceDirty, true); + readHandler->mObserver->OnBecameReportable(readHandler); + // Should have changed the scheduled timeout to the handler's min interval, to check, we wait for the min interval to + // expire + // Simulate system clock increment + sTestTimerDelegate.IncrementMockTimestamp(Milliseconds64(1100)); + + // Check that no report is scheduled since the min interval has expired, the timer should now be stopped + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportScheduled(readHandler)); + + // Test OnSubscriptionAction + readHandler->mFlags.Set(ReadHandler::ReadHandlerFlags::ForceDirty, false); + readHandler->mObserver->OnSubscriptionAction(readHandler); + // Should have changed the scheduled timeout to the handlers max interval, to check, we wait for the min interval to + // confirm it is not expired yet so the report should still be scheduled + + NL_TEST_ASSERT(aSuite, sScheduler.IsReportScheduled(readHandler)); + // Simulate system clock increment + sTestTimerDelegate.IncrementMockTimestamp(Milliseconds64(1100)); + + // Check that the report is still scheduled as the max interval has not expired yet and the dirty flag was cleared + NL_TEST_ASSERT(aSuite, sScheduler.IsReportScheduled(readHandler)); + // Simulate system clock increment + sTestTimerDelegate.IncrementMockTimestamp(Milliseconds64(2100)); + + // Check that no report is scheduled since the max interval should have expired, the timer should now be stopped + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportScheduled(readHandler)); + + // Test OnReadHandlerDestroyed + readHandler->mObserver->OnReadHandlerDestroyed(readHandler); + // Should have unregistered the read handler in the scheduler and cancelled the report + NL_TEST_ASSERT(aSuite, !sScheduler.IsReportScheduled(readHandler)); + NL_TEST_ASSERT(aSuite, sScheduler.GetNumReadHandlers() == 0); + NL_TEST_ASSERT(aSuite, nullptr == sScheduler.FindReadHandlerNode(readHandler)); + + sScheduler.UnregisterReadHandler(readHandler); + readHandlerPool.ReleaseAll(); + exchangeCtx->Close(); + NL_TEST_ASSERT(aSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); + } +}; + +} // namespace reporting +} // namespace app +} // namespace chip + +namespace { + +/** + * Test Suite. It lists all the test functions. + */ + +static nlTest sTests[] = { + NL_TEST_DEF("TestReadHandlerList", chip::app::reporting::TestReportScheduler::TestReadHandlerList), + NL_TEST_DEF("TestReportTiming", chip::app::reporting::TestReportScheduler::TestReportTiming), + NL_TEST_DEF("TestObserverCallbacks", chip::app::reporting::TestReportScheduler::TestObserverCallbacks), + NL_TEST_SENTINEL(), +}; + +nlTestSuite sSuite = { "TestReportScheduler", &sTests[0], TestContext::Initialize, TestContext::Finalize }; + +} // namespace + +int TestReportScheduler() +{ + return chip::ExecuteTestsWithContext(&sSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestReportScheduler); diff --git a/src/app/tests/suites/TestOperationalState.yaml b/src/app/tests/suites/TestOperationalState.yaml new file mode 100644 index 00000000000000..bd949b48905984 --- /dev/null +++ b/src/app/tests/suites/TestOperationalState.yaml @@ -0,0 +1,123 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Operational State Tests + +config: + nodeId: 0x12344321 + cluster: "Operational State" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read Phase List" + command: "readAttribute" + attribute: "PhaseList" + response: + value: null + + - label: "Read current Phase" + command: "readAttribute" + attribute: "CurrentPhase" + response: + value: null + + - label: "Read Countdown Time" + command: "readAttribute" + attribute: "CountdownTime" + response: + value: null + + - label: "Read Operational State List" + command: "readAttribute" + attribute: "OperationalStateList" + response: + value: + [ + { OperationalStateID: 0 }, + { OperationalStateID: 1 }, + { OperationalStateID: 2 }, + { OperationalStateID: 3 }, + ] + + - label: "Read current Operational Error" + command: "readAttribute" + attribute: "OperationalError" + response: + value: { ErrorStateID: 0 } + + - label: "Read current Operational State" + command: "readAttribute" + attribute: "OperationalState" + response: + value: 0 + + - label: "Start Command" + command: "Start" + response: + values: + - name: "CommandResponseState" + value: { ErrorStateID: 0 } + + - label: "Read current Operational State" + command: "readAttribute" + attribute: "OperationalState" + response: + value: 1 + + - label: "Pause Command" + command: "Pause" + response: + values: + - name: "CommandResponseState" + value: { ErrorStateID: 0 } + + - label: "Read current Operational State" + command: "readAttribute" + attribute: "OperationalState" + response: + value: 2 + + - label: "Resume Command" + command: "Resume" + response: + values: + - name: "CommandResponseState" + value: { ErrorStateID: 0 } + + - label: "Read current Operational State" + command: "readAttribute" + attribute: "OperationalState" + response: + value: 1 + + - label: "Stop Command" + command: "Stop" + response: + values: + - name: "CommandResponseState" + value: { ErrorStateID: 0 } + + - label: "Read current Operational State" + command: "readAttribute" + attribute: "OperationalState" + response: + value: 0 diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 82d7d55a1ff0ea..d4827a466a7bfe 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -3936,416 +3936,6 @@ PICS: - label: "Does the device implement receiving the ResetCondition command?" id: ACFREMON.S.C00.Rsp - # Ceramic Filter Monitoring Cluster Test Plan - - label: - "Does the device implement the Ceramic Filter Monitoring cluster as a - server?" - id: CFREMON.S - - - label: - "Does the device implement the Ceramic Filter Monitoring cluster as a - client?" - id: CFREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: CFREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: CFREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: CFREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: CFREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: CFREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: CFREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: CFREMON.S.C00.Rsp - - # Electrostatic Filter Monitoring Cluster Test Plan - - label: - "Does the device implement the Electrostatic Filter Monitoring cluster - as a server?" - id: ESFREMON.S - - - label: - "Does the device implement the Electrostatic Filter Monitoring cluster - as a client?" - id: ESFREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: ESFREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: ESFREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: ESFREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: ESFREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: ESFREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: ESFREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: ESFREMON.S.C00.Rsp - - # Fuel Tank Monitoring Cluster Test Plan - - label: - "Does the device implement the Fuel Tank Monitoring cluster as a - server?" - id: FTREMON.S - - - label: - "Does the device implement the Fuel Tank Monitoring cluster as a - client?" - id: FTREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: FTREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: FTREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: FTREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: FTREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: FTREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: FTREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: FTREMON.S.C00.Rsp - - # Ink Cartridge Monitoring Cluster Test Plan - - label: - "Does the device implement the Ink Cartridge Monitoring cluster as a - server?" - id: INKCREMON.S - - - label: - "Does the device implement the Ink Cartridge Monitoring cluster as a - client?" - id: INKCREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: INKCREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: INKCREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: INKCREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: INKCREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: INKCREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: INKCREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: INKCREMON.S.C00.Rsp - - # Ionizing Filter Monitoring Cluster Test Plan - - label: - "Does the device implement the Ionizing Filter Monitoring cluster as a - server?" - id: IONFREMON.S - - - label: - "Does the device implement the Ionizing Filter Monitoring cluster as a - client?" - id: IONFREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: IONFREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: IONFREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: IONFREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: IONFREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: IONFREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: IONFREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: IONFREMON.S.C00.Rsp - - # Ozone Filter Monitoring Cluster Test Plan - - label: - "Does the device implement the Ozone Filter Monitoring cluster as a - server?" - id: OZFREMON.S - - - label: - "Does the device implement the Ozone Filter Monitoring cluster as a - client?" - id: OZFREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: OZFREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: OZFREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: OZFREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: OZFREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: OZFREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: OZFREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: OZFREMON.S.C00.Rsp - - # Toner Cartridge Monitoring Cluster Test Plan - - label: - "Does the device implement the Toner Cartridge Monitoring cluster as a - server?" - id: TCREMON.S - - - label: - "Does the device implement the Toner Cartridge Monitoring cluster as a - client?" - id: TCREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: TCREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: TCREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: TCREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: TCREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: TCREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: TCREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: TCREMON.S.C00.Rsp - - # UV Filter Monitoring Cluster Test Plan - - label: - "Does the device implement the UV Filter Monitoring cluster as a - server?" - id: UVFREMON.S - - - label: - "Does the device implement the UV Filter Monitoring cluster as a - client?" - id: UVFREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: UVFREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: UVFREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: UVFREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: UVFREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: UVFREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: UVFREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: UVFREMON.S.C00.Rsp - - # Water Tank Monitoring Cluster Test Plan - - label: - "Does the device implement the Water Tank Monitoring cluster as a - server?" - id: WTREMON.S - - - label: - "Does the device implement the Water Tank Monitoring cluster as a - client?" - id: WTREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: WTREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: WTREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: WTREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: WTREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: WTREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: WTREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: WTREMON.S.C00.Rsp - - # Zeolite Filter Monitoring Cluster Test Plan - - label: - "Does the device implement the Zeolite Filter Monitoring cluster as a - server?" - id: ZEOFREMON.S - - - label: - "Does the device implement the Zeolite Filter Monitoring cluster as a - client?" - id: ZEOFREMON.C - - # - # server / attributes - # - - label: "Does the device implement the Condition attribute?" - id: ZEOFREMON.S.A0000 - - - label: "Does the device implement the DegradationDirection attribute?" - id: ZEOFREMON.S.A0001 - - - label: "Does the device implement the ChangeIndication attribute?" - id: ZEOFREMON.S.A0002 - - - label: "Does the device implement the InPlaceIndicator attribute?" - id: ZEOFREMON.S.A0003 - - # - # server / features - # - - label: "Does the device support the Condition feature?" - id: ZEOFREMON.S.F00 - - - label: "Does the device support the Warning feature?" - id: ZEOFREMON.S.F01 - - # - # server / commandsReceived - # - - label: "Does the device implement receiving the ResetCondition command?" - id: ZEOFREMON.S.C00.Rsp - # Identify Cluster Test Plan - label: "Does the device implement the Identify cluster as a server?" id: I.S diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml index 87fd561287839e..24e18d9207082c 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml @@ -22,9 +22,11 @@ config: nodeId: 0x12344321 cluster: "Access Control" endpoint: 0 + #Configurable endpoint except 0 + Endpoint_Except_Zero: 1 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 1: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -33,79 +35,24 @@ tests: value: nodeId - label: - "TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0" - command: "readAttribute" + "Step 2: TH reads DUT Descriptor cluster ServerList attribute from + Endpoint 0" cluster: "Descriptor" + command: "readAttribute" attribute: "ServerList" response: constraints: type: list contains: [31] - #Endpoint configuration is not supported in YAML - label: - "TH1 reads DUT Descriptor cluster ServerList attribute from every - Endpoint except 0" - verification: | - ./chip-tool descriptor read server-list 1 1 - - - On TH1(Chiptool) ,Verify the serverList attribute of Descriptor Cluster without an element of 31( 0x001F) - - [1676442452.204523][8902:8904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1718800852 - [1676442452.204637][8902:8904] CHIP:TOO: ServerList: 45 entries - [1676442452.204655][8902:8904] CHIP:TOO: [1]: 3 - [1676442452.204670][8902:8904] CHIP:TOO: [2]: 4 - [1676442452.204685][8902:8904] CHIP:TOO: [3]: 5 - [1676442452.204700][8902:8904] CHIP:TOO: [4]: 6 - [1676442452.204715][8902:8904] CHIP:TOO: [5]: 7 - [1676442452.204729][8902:8904] CHIP:TOO: [6]: 8 - [1676442452.204744][8902:8904] CHIP:TOO: [7]: 15 - [1676442452.204759][8902:8904] CHIP:TOO: [8]: 29 - [1676442452.204774][8902:8904] CHIP:TOO: [9]: 30 - [1676442452.204789][8902:8904] CHIP:TOO: [10]: 37 - [1676442452.204804][8902:8904] CHIP:TOO: [11]: 47 - [1676442452.204820][8902:8904] CHIP:TOO: [12]: 59 - [1676442452.204835][8902:8904] CHIP:TOO: [13]: 64 - [1676442452.204849][8902:8904] CHIP:TOO: [14]: 65 - [1676442452.204864][8902:8904] CHIP:TOO: [15]: 69 - [1676442452.204879][8902:8904] CHIP:TOO: [16]: 80 - [1676442452.204894][8902:8904] CHIP:TOO: [17]: 257 - [1676442452.204909][8902:8904] CHIP:TOO: [18]: 258 - [1676442452.204923][8902:8904] CHIP:TOO: [19]: 259 - [1676442452.204938][8902:8904] CHIP:TOO: [20]: 512 - [1676442452.204953][8902:8904] CHIP:TOO: [21]: 513 - [1676442452.204968][8902:8904] CHIP:TOO: [22]: 514 - [1676442452.204983][8902:8904] CHIP:TOO: [23]: 516 - [1676442452.204998][8902:8904] CHIP:TOO: [24]: 768 - [1676442452.205013][8902:8904] CHIP:TOO: [25]: 769 - [1676442452.205028][8902:8904] CHIP:TOO: [26]: 1024 - [1676442452.205043][8902:8904] CHIP:TOO: [27]: 1026 - [1676442452.205058][8902:8904] CHIP:TOO: [28]: 1027 - [1676442452.205072][8902:8904] CHIP:TOO: [29]: 1028 - [1676442452.205088][8902:8904] CHIP:TOO: [30]: 1029 - [1676442452.205103][8902:8904] CHIP:TOO: [31]: 1030 - [1676442452.205117][8902:8904] CHIP:TOO: [32]: 1283 - [1676442452.205133][8902:8904] CHIP:TOO: [33]: 1284 - [1676442452.205148][8902:8904] CHIP:TOO: [34]: 1285 - [1676442452.205168][8902:8904] CHIP:TOO: [35]: 1286 - [1676442452.205185][8902:8904] CHIP:TOO: [36]: 1287 - [1676442452.205199][8902:8904] CHIP:TOO: [37]: 1288 - [1676442452.205215][8902:8904] CHIP:TOO: [38]: 1289 - [1676442452.205230][8902:8904] CHIP:TOO: [39]: 1290 - [1676442452.205245][8902:8904] CHIP:TOO: [40]: 1291 - [1676442452.205260][8902:8904] CHIP:TOO: [41]: 1292 - [1676442452.205275][8902:8904] CHIP:TOO: [42]: 1293 - [1676442452.205290][8902:8904] CHIP:TOO: [43]: 1294 - [1676442452.205319][8902:8904] CHIP:TOO: [44]: 2820 - [1676442452.205331][8902:8904] CHIP:TOO: [45]: 4294048773 - [1676442452.205454][8902:8904] CHIP:EM: <<< [E:56665i M:248848283 (Ack:9298405)] (S) Msg TX to 1:00000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" + "Step 3: TH reads DUT Descriptor cluster ServerList attribute from + every Endpoint except 0" + endpoint: Endpoint_Except_Zero + cluster: "Descriptor" + command: "readAttribute" + attribute: "ServerList" + response: + constraints: + type: list + excludes: [31] diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml index d1633f30f81291..94a5bcc223f015 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml @@ -27,9 +27,11 @@ config: applicationId: type: char_string defaultValue: "exampleid" + #ApplicationBasic cluster endpoint + ApplicationBasic.Endpoint: 3 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -37,7 +39,7 @@ tests: - name: "nodeId" value: nodeId - - label: "Stop an app with the provided application ID" + - label: "Step 1: Stop an app with the provided application ID" PICS: APPLAUNCHER.S.C01.Rsp command: "StopApp" arguments: @@ -53,25 +55,10 @@ tests: - name: "Status" value: 0 - #Endpoint configuration is not supported in YAML - - label: "Reads the Status attribute" - PICS: PICS_USER_PROMPT - verification: | - The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): - ./chip-tool applicationbasic read status 1 3 - ./chip-tv-casting-app applicationbasic read status 1 3 - - On TH verify that the Status attribute value as 0 - [1658208937.049446][2428:2433] CHIP:DMG: InteractionModelRevision = 1 - [1658208937.049483][2428:2433] CHIP:DMG: } - [1658208937.049690][2428:2433] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_050D Attribute 0x0000_0005 DataVersion: 3850684771 - [1658208937.049809][2428:2433] CHIP:TOO: Status: 0 - [1658208937.049922][2428:2433] CHIP:EM: Sending Standalone Ack for MessageCounter:75774840 on exchange 3041i - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' after success" - - name: "expectedValue" - value: "y" + - label: "Step 2: Reads the Status attribute" + endpoint: ApplicationBasic.Endpoint + cluster: "Application Basic" + command: "readAttribute" + attribute: "Status" + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml index 8f7b49346d779c..a61053a4f1f667 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml @@ -27,9 +27,11 @@ config: applicationId: type: char_string defaultValue: "exampleid" + #ApplicationBasic cluster endpoint + ApplicationBasic.Endpoint: 3 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -37,7 +39,7 @@ tests: - name: "nodeId" value: nodeId - - label: "TH sends HideApp command to DUT" + - label: "Step 1: TH sends HideApp command to DUT" PICS: APPLAUNCHER.S.C02.Rsp command: "HideApp" arguments: @@ -49,24 +51,11 @@ tests: ApplicationID: applicationId, } - #Expected status attribute response ACTIVE_HIDDEN or STOPPED 'OR' condition is not supported in YAML - - label: "Reads the Status attribute" - verification: | - The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): - ./chip-tool applicationbasic read status 1 3 - ./chip-tool applicationbasic read status 1 3 - - On TH verify that the Status attribute value as 0 - [1658209002.942766][2442:2447] CHIP:DMG: } - [1658209002.942976][2442:2447] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_050D Attribute 0x0000_0005 DataVersion: 3850684771 - [1658209002.943067][2442:2447] CHIP:TOO: Status: 0 - [1658209002.943177][2442:2447] CHIP:EM: Sending Standalone Ack for MessageCounter:54939405 on exchange 63408i" - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + - label: "Step 2: Reads the Status attribute" + endpoint: ApplicationBasic.Endpoint + cluster: "Application Basic" + command: "readAttribute" + attribute: "Status" + response: + constraints: + anyOf: [0, 2] diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml index 5037d2015f244d..f4098448d523cf 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2023 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 12.2.2. [TC-BINFO-2.2] Events [DUT-Server] @@ -24,64 +23,128 @@ config: endpoint: 0 tests: - - label: "Precondition" - verification: | - 1. DUT and TH can interact with each other. DUT is commissioned. - - 2. BINFO.S.A0009(SoftwareVersion) - TH reads SoftwareVersion attribute from DUT and saves for future use - - 3. BINFO.S.A0011(Reachable) - TH reads Reachable attribute from DUT and saves for future use(should be true) - - 4. BINFO.S.E00(StartUp) | BINFO.S.E01(ShutDown) || BINFO.S.E02(Leave) - TH subscribes to StartUp, ShutDown, Leave and ReachableChanged events on the Basic Information cluster of the DUT - - 5. TH saves the FabricIndex during commissioning - disabled: true - - - label: "Reboot the DUT TH reads the StartUp event from DUT" + - label: "Step 0: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: + "TH reads SoftwareVersion attribute from DUT and saves for future use" + PICS: BINFO.S.A0009 + command: "readAttribute" + attribute: "SoftwareVersion" + response: + saveAs: SoftwareVersionValue + + - label: + "Precondition: TH reads Reachable attribute from DUT and saves for + future use" + PICS: BINFO.S.A0011 + command: "readAttribute" + attribute: "Reachable" + response: + value: true + saveAs: ReachableValue + + - label: "Precondition: TH saves the FabricIndex during commissioning" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: CurrentFabricIndexValue + + - label: + "Precondition: TH subscribes to StartUp event on the Basic Information + cluster of the DUT" PICS: BINFO.S.E00 - verification: | - To verify StartUp event follow the below commands , Pls use equivalent command on the respective DUT - - - ./chip-tool basicinformation read-event start-up 1 0 - - Verify that StartUp event priority is set is to CRITICAL and software verision is 1 on TH(chip-tool) - - [1657193007.841105][5422:5427] CHIP:DMG: ], - [1657193007.841137][5422:5427] CHIP:DMG: - [1657193007.841162][5422:5427] CHIP:DMG: SuppressResponse = true, - [1657193007.841186][5422:5427] CHIP:DMG: InteractionModelRevision = 1 - [1657193007.841209][5422:5427] CHIP:DMG: } - [1657193007.841358][5422:5427] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0000 - [1657193007.841387][5422:5427] CHIP:TOO: Event number: 0 - [1657193007.841409][5422:5427] CHIP:TOO: Priority: Critical - [1657193007.841431][5422:5427] CHIP:TOO: Timestamp: 132146 - [1657193007.841531][5422:5427] CHIP:TOO: StartUp: { - [1657193007.841570][5422:5427] CHIP:TOO: SoftwareVersion: 1 - [1657193007.841594][5422:5427] CHIP:TOO: } - [1657193007.841691][5422:5427] CHIP:EM: Sending Standalone Ack for MessageCounter:91740387 on exchange 60385i - disabled: true - - - label: "TH subscribes to the ShutDown event on the DUT. Shutdown DUT." + command: "subscribeEvent" + event: "StartUp" + minInterval: 30 + maxInterval: 100 + response: + constraints: + type: StartUp + + - label: + "Precondition: TH subscribes to ShutDown event on the Basic + Information cluster of the DUT" PICS: BINFO.S.E01 + command: "subscribeEvent" + event: "ShutDown" + minInterval: 30 + maxInterval: 100 + + - label: + "Precondition: TH subscribes to Leave event on the Basic Information + cluster of the DUT" + PICS: BINFO.S.E02 + command: "subscribeEvent" + event: "Leave" + minInterval: 30 + maxInterval: 100 + + ### DUT TurnOff + - label: "Step 1: Reboot the DUT" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "Reboot" + + - label: "Step 1: Reboot target device(DUT)" verification: | - To verify ShutDown event follow the below commands , Pls use equivalent command on the respective DUT - - - 1. Launch chip-tool into interactive mode with the command - - ./chip-tool interactive start - - 2. run below command in interactive mode shell and Turn down the DUT - basicinformation subscribe-event shut-down 20 100 1 0 - - verify that ShutDown event as priority set has CRITICAL on TH(Chip-tool) - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0001 - [1653050528.900202][119367:119372] CHIP:TOO: Event number: 5 - [1653050528.900295][119367:119372] CHIP:TOO: Priority: Critical - [1653050528.900386][119367:119372] CHIP:TOO: Timestamp: 289436805 - [1653050528.900630][119367:119372] CHIP:TOO: ShutDown: { - [1653050528.900732][119367:119372] CHIP:TOO: } - [1653050528.900892][119367:119372] CHIP:DMG: Refresh LivenessCheckTime for 28000 milliseconds with SubscriptionId = 0x27408c83 Peer = 01:0000000000000001 - disabled: true + Did the DUT successfully reboot? + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the DUT and enter 'y' after DUT starts" + - name: "expectedValue" + value: "y" + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 2: TH reads the StartUp event from DUT" + PICS: BINFO.S.E00 + command: "readEvent" + event: "StartUp" + response: + value: { SoftwareVersion: SoftwareVersionValue } + + - label: "Verify that StartUp event has priority set as CRITICAL" + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && BINFO.S.E00 + arguments: + values: + - name: "message" + value: "If priority set as CRITICAL enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "Step 3: TH subscribes to the ShutDown event on the DUT. Shutdown DUT." + PICS: BINFO.S.E01 + command: "subscribeEvent" + event: "ShutDown" + minInterval: 30 + maxInterval: 100 + + - label: "Verify that ShutDown event has priority set as CRITICAL" + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && BINFO.S.E01 + arguments: + values: + - name: "message" + value: "If priority set as CRITICAL enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml index 69b942fd24fd52..812dd4732ba046 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml @@ -13,7 +13,9 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 19.1.1. [TC-SC-5.1] Adding member to a group +name: + 26.1.1. [TC-SC-5.1] Adding member to a group - TH as Admin and DUT as Group + Member PICS: - MCORE.ROLE.COMMISSIONEE @@ -21,11 +23,13 @@ PICS: config: nodeId: 0x12344321 cluster: "Groups" + endpoint: 0 + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT - endpoint: 1 + Groups.Endpoint: 1 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -41,10 +45,8 @@ tests: - name: "nodeId" saveAs: commissionerNodeId - - label: "TH adds ACL Operate privileges for Group 0x0103" - PICS: PICS_SDK_CI_ONLY + - label: "Step 1: TH adds ACL Operate privileges for Group 0x0103" cluster: "Access Control" - endpoint: 0 command: "writeAttribute" attribute: "ACL" arguments: @@ -66,84 +68,8 @@ tests: }, ] - - label: "TH adds ACL Operate privileges for Group 0x0103" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": ["0x0103"], "targets": null }]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674109884.293472][29548:29550] CHIP:DMG: WriteResponseMessage = - [1674109884.293477][29548:29550] CHIP:DMG: { - [1674109884.293479][29548:29550] CHIP:DMG: AttributeStatusIBs = - [1674109884.293486][29548:29550] CHIP:DMG: [ - [1674109884.293489][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293494][29548:29550] CHIP:DMG: { - [1674109884.293497][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293502][29548:29550] CHIP:DMG: { - [1674109884.293506][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293510][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293514][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293518][29548:29550] CHIP:DMG: } - [1674109884.293523][29548:29550] CHIP:DMG: - [1674109884.293527][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293531][29548:29550] CHIP:DMG: { - [1674109884.293536][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293539][29548:29550] CHIP:DMG: }, - [1674109884.293543][29548:29550] CHIP:DMG: - [1674109884.293547][29548:29550] CHIP:DMG: }, - [1674109884.293572][29548:29550] CHIP:DMG: - [1674109884.293575][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293579][29548:29550] CHIP:DMG: { - [1674109884.293582][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293586][29548:29550] CHIP:DMG: { - [1674109884.293590][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293594][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293598][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293602][29548:29550] CHIP:DMG: ListIndex = Null, - [1674109884.293605][29548:29550] CHIP:DMG: } - [1674109884.293611][29548:29550] CHIP:DMG: - [1674109884.293614][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293618][29548:29550] CHIP:DMG: { - [1674109884.293621][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293625][29548:29550] CHIP:DMG: }, - [1674109884.293629][29548:29550] CHIP:DMG: - [1674109884.293632][29548:29550] CHIP:DMG: }, - [1674109884.293640][29548:29550] CHIP:DMG: - [1674109884.293643][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293647][29548:29550] CHIP:DMG: { - [1674109884.293650][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293654][29548:29550] CHIP:DMG: { - [1674109884.293657][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293661][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293665][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293669][29548:29550] CHIP:DMG: ListIndex = Null, - [1674109884.293672][29548:29550] CHIP:DMG: } - [1674109884.293678][29548:29550] CHIP:DMG: - [1674109884.293681][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293685][29548:29550] CHIP:DMG: { - [1674109884.293689][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293692][29548:29550] CHIP:DMG: }, - [1674109884.293696][29548:29550] CHIP:DMG: - [1674109884.293699][29548:29550] CHIP:DMG: }, - [1674109884.293704][29548:29550] CHIP:DMG: - [1674109884.293707][29548:29550] CHIP:DMG: ], - [1674109884.293717][29548:29550] CHIP:DMG: - [1674109884.293721][29548:29550] CHIP:DMG: InteractionModelRevision = 1 - [1674109884.293724][29548:29550] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends KeySetWrite command with incorrect key" - PICS: PICS_SDK_CI_ONLY + - label: "Step 2a: TH sends KeySetWrite command with incorrect key" cluster: "Group Key Management" - endpoint: 0 command: "KeySetWrite" arguments: values: @@ -160,55 +86,8 @@ tests: EpochStartTime2: 333, } - - label: "TH sends KeySetWrite command with incorrect key" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3","groupKeySecurityPolicy": 0, "epochKey0":"00000000000000000000000000000001", "epochStartTime0": 111,"epochKey1":"00000000000000000000000000000002", "epochStartTime1": 222,"epochKey2":"00000000000000000000000000000003", "epochStartTime2": 333 }' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674109957.007856][29570:29572] CHIP:DMG: InvokeResponseMessage = - [1674109957.007859][29570:29572] CHIP:DMG: { - [1674109957.007862][29570:29572] CHIP:DMG: suppressResponse = false, - [1674109957.007865][29570:29572] CHIP:DMG: InvokeResponseIBs = - [1674109957.007872][29570:29572] CHIP:DMG: [ - [1674109957.007875][29570:29572] CHIP:DMG: InvokeResponseIB = - [1674109957.007880][29570:29572] CHIP:DMG: { - [1674109957.007883][29570:29572] CHIP:DMG: CommandStatusIB = - [1674109957.007887][29570:29572] CHIP:DMG: { - [1674109957.007890][29570:29572] CHIP:DMG: CommandPathIB = - [1674109957.007894][29570:29572] CHIP:DMG: { - [1674109957.007898][29570:29572] CHIP:DMG: EndpointId = 0x0, - [1674109957.007901][29570:29572] CHIP:DMG: ClusterId = 0x3f, - [1674109957.007905][29570:29572] CHIP:DMG: CommandId = 0x0, - [1674109957.007909][29570:29572] CHIP:DMG: }, - [1674109957.007913][29570:29572] CHIP:DMG: - [1674109957.007917][29570:29572] CHIP:DMG: StatusIB = - [1674109957.007921][29570:29572] CHIP:DMG: { - [1674109957.007924][29570:29572] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109957.007927][29570:29572] CHIP:DMG: }, - [1674109957.007931][29570:29572] CHIP:DMG: - [1674109957.007933][29570:29572] CHIP:DMG: }, - [1674109957.007938][29570:29572] CHIP:DMG: - [1674109957.007941][29570:29572] CHIP:DMG: }, - [1674109957.007946][29570:29572] CHIP:DMG: - [1674109957.007948][29570:29572] CHIP:DMG: ], - [1674109957.007953][29570:29572] CHIP:DMG: - [1674109957.007956][29570:29572] CHIP:DMG: InteractionModelRevision = 1 - [1674109957.007958][29570:29572] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends KeySetWrite command with TH key" - PICS: PICS_SDK_CI_ONLY + - label: "Step 2b: TH sends KeySetWrite command with TH key" cluster: "Group Key Management" - endpoint: 0 command: "KeySetWrite" arguments: values: @@ -225,121 +104,21 @@ tests: EpochStartTime2: 2220002, } - - label: "TH sends KeySetWrite command with TH key" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3","groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674110035.037849][29578:29580] CHIP:DMG: InvokeResponseMessage = - [1674110035.037852][29578:29580] CHIP:DMG: { - [1674110035.037856][29578:29580] CHIP:DMG: suppressResponse = false, - [1674110035.037859][29578:29580] CHIP:DMG: InvokeResponseIBs = - [1674110035.037864][29578:29580] CHIP:DMG: [ - [1674110035.037867][29578:29580] CHIP:DMG: InvokeResponseIB = - [1674110035.037872][29578:29580] CHIP:DMG: { - [1674110035.037875][29578:29580] CHIP:DMG: CommandStatusIB = - [1674110035.037879][29578:29580] CHIP:DMG: { - [1674110035.037882][29578:29580] CHIP:DMG: CommandPathIB = - [1674110035.037886][29578:29580] CHIP:DMG: { - [1674110035.037890][29578:29580] CHIP:DMG: EndpointId = 0x0, - [1674110035.037893][29578:29580] CHIP:DMG: ClusterId = 0x3f, - [1674110035.037897][29578:29580] CHIP:DMG: CommandId = 0x0, - [1674110035.037900][29578:29580] CHIP:DMG: }, - [1674110035.037905][29578:29580] CHIP:DMG: - [1674110035.037908][29578:29580] CHIP:DMG: StatusIB = - [1674110035.037912][29578:29580] CHIP:DMG: { - [1674110035.037916][29578:29580] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110035.037920][29578:29580] CHIP:DMG: }, - [1674110035.037925][29578:29580] CHIP:DMG: - [1674110035.037929][29578:29580] CHIP:DMG: }, - [1674110035.037934][29578:29580] CHIP:DMG: - [1674110035.037938][29578:29580] CHIP:DMG: }, - [1674110035.037944][29578:29580] CHIP:DMG: - [1674110035.037948][29578:29580] CHIP:DMG: ], - [1674110035.037954][29578:29580] CHIP:DMG: - [1674110035.037957][29578:29580] CHIP:DMG: InteractionModelRevision = 1 - [1674110035.037960][29578:29580] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH binds GroupId to GroupKeySet" - PICS: PICS_SDK_CI_ONLY + - label: "Step 3: TH binds GroupId to GroupKeySet" cluster: "Group Key Management" - endpoint: 0 command: "writeAttribute" attribute: "GroupKeyMap" arguments: value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }] - - label: "TH binds GroupId to GroupKeySet" - verification: | - ./chip-tool groupkeymanagement write group-key-map '[{"groupId": "0x0103", "groupKeySetID": "0x01a3", "fabricIndex": 1}]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674110101.932149][29586:29588] CHIP:DMG: WriteResponseMessage = - [1674110101.932152][29586:29588] CHIP:DMG: { - [1674110101.932155][29586:29588] CHIP:DMG: AttributeStatusIBs = - [1674110101.932161][29586:29588] CHIP:DMG: [ - [1674110101.932164][29586:29588] CHIP:DMG: AttributeStatusIB = - [1674110101.932169][29586:29588] CHIP:DMG: { - [1674110101.932173][29586:29588] CHIP:DMG: AttributePathIB = - [1674110101.932177][29586:29588] CHIP:DMG: { - [1674110101.932181][29586:29588] CHIP:DMG: Endpoint = 0x0, - [1674110101.932185][29586:29588] CHIP:DMG: Cluster = 0x3f, - [1674110101.932189][29586:29588] CHIP:DMG: Attribute = 0x0000_0000, - [1674110101.932193][29586:29588] CHIP:DMG: } - [1674110101.932198][29586:29588] CHIP:DMG: - [1674110101.932201][29586:29588] CHIP:DMG: StatusIB = - [1674110101.932206][29586:29588] CHIP:DMG: { - [1674110101.932210][29586:29588] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110101.932213][29586:29588] CHIP:DMG: }, - [1674110101.932217][29586:29588] CHIP:DMG: - [1674110101.932220][29586:29588] CHIP:DMG: }, - [1674110101.932227][29586:29588] CHIP:DMG: - [1674110101.932230][29586:29588] CHIP:DMG: AttributeStatusIB = - [1674110101.932234][29586:29588] CHIP:DMG: { - [1674110101.932237][29586:29588] CHIP:DMG: AttributePathIB = - [1674110101.932240][29586:29588] CHIP:DMG: { - [1674110101.932244][29586:29588] CHIP:DMG: Endpoint = 0x0, - [1674110101.932248][29586:29588] CHIP:DMG: Cluster = 0x3f, - [1674110101.932252][29586:29588] CHIP:DMG: Attribute = 0x0000_0000, - [1674110101.932256][29586:29588] CHIP:DMG: ListIndex = Null, - [1674110101.932259][29586:29588] CHIP:DMG: } - [1674110101.932264][29586:29588] CHIP:DMG: - [1674110101.932267][29586:29588] CHIP:DMG: StatusIB = - [1674110101.932270][29586:29588] CHIP:DMG: { - [1674110101.932273][29586:29588] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110101.932276][29586:29588] CHIP:DMG: }, - [1674110101.932280][29586:29588] CHIP:DMG: - [1674110101.932283][29586:29588] CHIP:DMG: }, - [1674110101.932288][29586:29588] CHIP:DMG: - [1674110101.932291][29586:29588] CHIP:DMG: ], - [1674110101.932298][29586:29588] CHIP:DMG: - [1674110101.932301][29586:29588] CHIP:DMG: InteractionModelRevision = 1 - [1674110101.932305][29586:29588] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends RemoveAllGroups command" + - label: + "Step 4: TH sends RemoveAllGroups command to the DUT on + PIXIT.G.ENDPOINT " + endpoint: Groups.Endpoint command: "RemoveAllGroups" - - label: "TH sends AddGroup command" + - label: "Step 5: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "AddGroup" arguments: values: @@ -348,8 +127,9 @@ tests: - name: GroupName value: "Test Group" - - label: "TH sends ViewGroup command" + - label: "Step 6a: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT" PICS: G.S.F00 + endpoint: Groups.Endpoint command: "ViewGroup" arguments: values: @@ -364,8 +144,9 @@ tests: - name: GroupName value: "Test Group" - - label: "TH sends ViewGroup command" + - label: "Step 6b: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT" PICS: "!(G.S.F00)" + endpoint: Groups.Endpoint command: "ViewGroup" arguments: values: @@ -380,10 +161,8 @@ tests: - name: GroupName value: "" - - label: "TH sends KeySetRead" - PICS: PICS_SDK_CI_ONLY + - label: "Step 7: TH sends KeySetRead" cluster: "Group Key Management" - endpoint: 0 command: "KeySetRead" arguments: values: @@ -404,82 +183,18 @@ tests: EpochStartTime2: 2220002, } - - label: "TH sends KeySetRead" - verification: | - ./chip-tool groupkeymanagement key-set-read "0x01a3" 1 0 - - Verify DUT sends a KeySetReadResponse with the GroupKeySet having the following fields: - GroupKeySetID: 0x01a3(Decimal value 419) - GroupKeySecurityPolicy: TrustFirst (0) - EpochKey0: null - EpochStartTime0: 2220000 - EpochKey1: null - EpochStartTime1: 2220001 - EpochKey2: null - EpochStartTime0: 2220002 on TH(chip-tool) Logs: - - [1674110375.913702][29626:29628] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003F Command=0x0000_0002 - [1674110375.913742][29626:29628] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Command 0x0000_0002 - [1674110375.914256][29626:29628] CHIP:TOO: KeySetReadResponse: { - [1674110375.914277][29626:29628] CHIP:TOO: groupKeySet: { - [1674110375.914293][29626:29628] CHIP:TOO: GroupKeySetID: 419 - [1674110375.914306][29626:29628] CHIP:TOO: GroupKeySecurityPolicy: 0 - [1674110375.914317][29626:29628] CHIP:TOO: EpochKey0: null - [1674110375.914329][29626:29628] CHIP:TOO: EpochStartTime0: 2220000 - [1674110375.914339][29626:29628] CHIP:TOO: EpochKey1: null - [1674110375.914350][29626:29628] CHIP:TOO: EpochStartTime1: 2220001 - [1674110375.914359][29626:29628] CHIP:TOO: EpochKey2: null - [1674110375.914369][29626:29628] CHIP:TOO: EpochStartTime2: 2220002 - [1674110375.914379][29626:29628] CHIP:TOO: } - [1674110375.914390][29626:29628] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: - "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster" + "Step 8: TH reads GroupKeyMap Attribute from the GroupKeyManagement + cluster" cluster: "Group Key Management" - PICS: PICS_SDK_CI_ONLY - endpoint: 0 command: "readAttribute" attribute: "GroupKeyMap" response: value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }] - - label: - "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster" - verification: | - ./chip-tool groupkeymanagement read group-key-map 1 0 - - Verify GroupKeyMap attribute list containing GroupId: 0x0103(Decimal value 259) and GroupKeySetId: 0x01a3(Decimal value 419 ) on TH(chip-tool) Logs: - - [1674110435.952959][29634:29636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0000 DataVersion: 624171954 - [1674110435.953367][29634:29636] CHIP:TOO: GroupKeyMap: 1 entries - [1674110435.953401][29634:29636] CHIP:TOO: [1]: { - [1674110435.953407][29634:29636] CHIP:TOO: GroupId: 259 - [1674110435.953411][29634:29636] CHIP:TOO: GroupKeySetID: 419 - [1674110435.953414][29634:29636] CHIP:TOO: FabricIndex: 1 - [1674110435.953417][29634:29636] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH reads GroupTable attribute" + - label: "Step 9a: TH reads GroupTable attribute" cluster: "Group Key Management" - endpoint: 0 - PICS: G.S.F00 && PICS_SDK_CI_ONLY + PICS: G.S.F00 command: "readAttribute" attribute: "GroupTable" response: @@ -487,244 +202,52 @@ tests: [ { GroupId: 0x0103, - Endpoints: [endpoint], + Endpoints: [Groups.Endpoint], GroupName: "Test Group", }, ] - - label: "TH reads GroupTable attribute" - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify GroupTable attribute list containing GroupId: 0x0103(Decimal value 259), Endpoint:0 and GroupKeySetId: 0x01a3(Decimal value 419 ) on TH(chip-tool) Logs: - - [1674110549.621751][29686:29688] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 624171954 - [1674110549.621779][29686:29688] CHIP:TOO: GroupTable: 1 entries - [1674110549.621810][29686:29688] CHIP:TOO: [1]: { - [1674110549.621819][29686:29688] CHIP:TOO: GroupId: 259 - [1674110549.621826][29686:29688] CHIP:TOO: Endpoints: 1 entries - [1674110549.621833][29686:29688] CHIP:TOO: [1]: 0 - [1674110549.621839][29686:29688] CHIP:TOO: GroupName: Test Group - [1674110549.621845][29686:29688] CHIP:TOO: FabricIndex: 1 - [1674110549.621849][29686:29688] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && G.S.F00 - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH reads GroupTable attribute" + - label: "Step 9b: TH reads GroupTable attribute" cluster: "Group Key Management" - endpoint: 0 - PICS: PICS_SDK_CI_ONLY && !G.S.F00 + PICS: " !G.S.F00 " command: "readAttribute" attribute: "GroupTable" response: - value: [{ GroupId: 0x0103, Endpoints: [endpoint], GroupName: "" }] - - - label: "TH reads GroupTable attribute" - verification: | - If F00(GN) feature is not supporting for GroupTable attribute - - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify GroupTable attribute list containing GroupId: 0x0103(Decimal value 259), Endpoint:0 and GroupKeySetId: 0x01a3(Decimal value 419 ) on TH(chip-tool) Logs: - - [1674110549.621751][29686:29688] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 624171954 - [1674110549.621779][29686:29688] CHIP:TOO: GroupTable: 1 entries - [1674110549.621810][29686:29688] CHIP:TOO: [1]: { - [1674110549.621819][29686:29688] CHIP:TOO: GroupId: 259 - [1674110549.621826][29686:29688] CHIP:TOO: Endpoints: 1 entries - [1674110549.621833][29686:29688] CHIP:TOO: [1]: 0 - [1674110549.621839][29686:29688] CHIP:TOO: GroupName: Test Group - [1674110549.621845][29686:29688] CHIP:TOO: FabricIndex: 1 - [1674110549.621849][29686:29688] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && !G.S.F00 - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: + [{ GroupId: 0x0103, Endpoints: [Groups.Endpoint], GroupName: "" }] - - label: "TH removes the GroupKeySet" - PICS: PICS_SDK_CI_ONLY + - label: "Step 10: TH removes the GroupKeySet" cluster: "Group Key Management" - endpoint: 0 command: "KeySetRemove" arguments: values: - name: GroupKeySetID value: 0x01a3 - - label: "TH removes the GroupKeySet" - verification: | - ./chip-tool groupkeymanagement key-set-remove "0x01a3" 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674110684.044225][29696:29698] CHIP:DMG: InvokeResponseMessage = - [1674110684.044235][29696:29698] CHIP:DMG: { - [1674110684.044246][29696:29698] CHIP:DMG: suppressResponse = false, - [1674110684.044256][29696:29698] CHIP:DMG: InvokeResponseIBs = - [1674110684.044277][29696:29698] CHIP:DMG: [ - [1674110684.044288][29696:29698] CHIP:DMG: InvokeResponseIB = - [1674110684.044310][29696:29698] CHIP:DMG: { - [1674110684.044320][29696:29698] CHIP:DMG: CommandStatusIB = - [1674110684.044334][29696:29698] CHIP:DMG: { - [1674110684.044345][29696:29698] CHIP:DMG: CommandPathIB = - [1674110684.044358][29696:29698] CHIP:DMG: { - [1674110684.044372][29696:29698] CHIP:DMG: EndpointId = 0x0, - [1674110684.044385][29696:29698] CHIP:DMG: ClusterId = 0x3f, - [1674110684.044397][29696:29698] CHIP:DMG: CommandId = 0x3, - [1674110684.044408][29696:29698] CHIP:DMG: }, - [1674110684.044426][29696:29698] CHIP:DMG: - [1674110684.044438][29696:29698] CHIP:DMG: StatusIB = - [1674110684.044452][29696:29698] CHIP:DMG: { - [1674110684.044465][29696:29698] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110684.044476][29696:29698] CHIP:DMG: }, - [1674110684.044490][29696:29698] CHIP:DMG: - [1674110684.044499][29696:29698] CHIP:DMG: }, - [1674110684.044517][29696:29698] CHIP:DMG: - [1674110684.044527][29696:29698] CHIP:DMG: }, - [1674110684.044543][29696:29698] CHIP:DMG: - [1674110684.044553][29696:29698] CHIP:DMG: ], - [1674110684.044572][29696:29698] CHIP:DMG: - [1674110684.044583][29696:29698] CHIP:DMG: InteractionModelRevision = 1 - [1674110684.044592][29696:29698] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH verifies the corresponding GroupKeyMap entry has been removed" - PICS: PICS_SDK_CI_ONLY + - label: + "Step 11: TH verifies the corresponding GroupKeyMap entry has been + removed" cluster: "Group Key Management" - endpoint: 0 command: "readAttribute" attribute: "GroupKeyMap" response: value: [] - - label: "TH verifies the corresponding GroupKeyMap entry has been removed" - verification: | - ./chip-tool groupkeymanagement read group-key-map 1 0 - - Verify GroupKeyMap containing empty list on TH(chip-tool) Logs: - - [1674110744.294550][29707:29709] CHIP:DMG: ReportDataMessage = - [1674110744.294570][29707:29709] CHIP:DMG: { - [1674110744.294583][29707:29709] CHIP:DMG: AttributeReportIBs = - [1674110744.294611][29707:29709] CHIP:DMG: [ - [1674110744.294626][29707:29709] CHIP:DMG: AttributeReportIB = - [1674110744.294654][29707:29709] CHIP:DMG: { - [1674110744.294667][29707:29709] CHIP:DMG: AttributeDataIB = - [1674110744.294686][29707:29709] CHIP:DMG: { - [1674110744.294703][29707:29709] CHIP:DMG: DataVersion = 0x25341bb2, - [1674110744.294719][29707:29709] CHIP:DMG: AttributePathIB = - [1674110744.294739][29707:29709] CHIP:DMG: { - [1674110744.294756][29707:29709] CHIP:DMG: Endpoint = 0x0, - [1674110744.294773][29707:29709] CHIP:DMG: Cluster = 0x3f, - [1674110744.294847][29707:29709] CHIP:DMG: Attribute = 0x0000_0000, - [1674110744.294864][29707:29709] CHIP:DMG: } - [1674110744.294885][29707:29709] CHIP:DMG: - [1674110744.294900][29707:29709] CHIP:DMG: Data = [ - [1674110744.294917][29707:29709] CHIP:DMG: - [1674110744.294935][29707:29709] CHIP:DMG: ], - [1674110744.294950][29707:29709] CHIP:DMG: }, - [1674110744.294974][29707:29709] CHIP:DMG: - [1674110744.294986][29707:29709] CHIP:DMG: }, - [1674110744.295012][29707:29709] CHIP:DMG: - [1674110744.295023][29707:29709] CHIP:DMG: ], - [1674110744.295050][29707:29709] CHIP:DMG: - [1674110744.295063][29707:29709] CHIP:DMG: SuppressResponse = true, - [1674110744.295079][29707:29709] CHIP:DMG: InteractionModelRevision = 1 - [1674110744.295093][29707:29709] CHIP:DMG: } - [1674110744.295288][29707:29709] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0000 DataVersion: 624171954 - [1674110744.295368][29707:29709] CHIP:TOO: GroupKeyMap: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH cleans up groups using RemoveAllGroups command" + - label: + "Step 12: TH cleans up groups using RemoveAllGroups command to the DUT + on PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "RemoveAllGroups" - - label: "TH verifies the group has been removed in the GroupTable" - PICS: PICS_SDK_CI_ONLY + - label: "Step 13: TH verifies the group has been removed in the GroupTable" cluster: "Group Key Management" - endpoint: 0 command: "readAttribute" attribute: "GroupTable" response: value: [] - - label: "TH verifies the group has been removed in the GroupTable" - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify GroupTable containing empty list on TH(chip-tool) Logs: - - [1674110892.787761][29730:29732] CHIP:DMG: ReportDataMessage = - [1674110892.787768][29730:29732] CHIP:DMG: { - [1674110892.787772][29730:29732] CHIP:DMG: AttributeReportIBs = - [1674110892.787780][29730:29732] CHIP:DMG: [ - [1674110892.787783][29730:29732] CHIP:DMG: AttributeReportIB = - [1674110892.787789][29730:29732] CHIP:DMG: { - [1674110892.787792][29730:29732] CHIP:DMG: AttributeDataIB = - [1674110892.787797][29730:29732] CHIP:DMG: { - [1674110892.787803][29730:29732] CHIP:DMG: DataVersion = 0x25341bb2, - [1674110892.787806][29730:29732] CHIP:DMG: AttributePathIB = - [1674110892.787811][29730:29732] CHIP:DMG: { - [1674110892.787815][29730:29732] CHIP:DMG: Endpoint = 0x0, - [1674110892.787819][29730:29732] CHIP:DMG: Cluster = 0x3f, - [1674110892.787825][29730:29732] CHIP:DMG: Attribute = 0x0000_0001, - [1674110892.787828][29730:29732] CHIP:DMG: } - [1674110892.787834][29730:29732] CHIP:DMG: - [1674110892.787840][29730:29732] CHIP:DMG: Data = [ - [1674110892.787843][29730:29732] CHIP:DMG: - [1674110892.787847][29730:29732] CHIP:DMG: ], - [1674110892.787850][29730:29732] CHIP:DMG: }, - [1674110892.787855][29730:29732] CHIP:DMG: - [1674110892.787858][29730:29732] CHIP:DMG: }, - [1674110892.787863][29730:29732] CHIP:DMG: - [1674110892.787865][29730:29732] CHIP:DMG: ], - [1674110892.787871][29730:29732] CHIP:DMG: - [1674110892.787875][29730:29732] CHIP:DMG: SuppressResponse = true, - [1674110892.787878][29730:29732] CHIP:DMG: InteractionModelRevision = 1 - [1674110892.787881][29730:29732] CHIP:DMG: } - [1674110892.787953][29730:29732] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 624171954 - [1674110892.787973][29730:29732] CHIP:TOO: GroupTable: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH removes ACL Operate privileges for Group 0x0103" - PICS: PICS_SDK_CI_ONLY + - label: "Step 14: TH removes ACL Operate privileges for Group 0x0103" cluster: "Access Control" - endpoint: 0 command: "writeAttribute" attribute: "ACL" arguments: @@ -738,60 +261,3 @@ tests: Targets: null, }, ] - - - label: "TH removes ACL Operate privileges for Group 0x0103" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null }]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674209548.549754][6888:6890] CHIP:DMG: WriteResponseMessage = - [1674209548.549758][6888:6890] CHIP:DMG: { - [1674209548.549760][6888:6890] CHIP:DMG: AttributeStatusIBs = - [1674209548.549765][6888:6890] CHIP:DMG: [ - [1674209548.549768][6888:6890] CHIP:DMG: AttributeStatusIB = - [1674209548.549772][6888:6890] CHIP:DMG: { - [1674209548.549775][6888:6890] CHIP:DMG: AttributePathIB = - [1674209548.549779][6888:6890] CHIP:DMG: { - [1674209548.549782][6888:6890] CHIP:DMG: Endpoint = 0x0, - [1674209548.549786][6888:6890] CHIP:DMG: Cluster = 0x1f, - [1674209548.549789][6888:6890] CHIP:DMG: Attribute = 0x0000_0000, - [1674209548.549792][6888:6890] CHIP:DMG: } - [1674209548.549797][6888:6890] CHIP:DMG: - [1674209548.549800][6888:6890] CHIP:DMG: StatusIB = - [1674209548.549804][6888:6890] CHIP:DMG: { - [1674209548.549807][6888:6890] CHIP:DMG: status = 0x00 (SUCCESS), - [1674209548.549810][6888:6890] CHIP:DMG: }, - [1674209548.549813][6888:6890] CHIP:DMG: - [1674209548.549816][6888:6890] CHIP:DMG: }, - [1674209548.549823][6888:6890] CHIP:DMG: - [1674209548.549825][6888:6890] CHIP:DMG: AttributeStatusIB = - [1674209548.549828][6888:6890] CHIP:DMG: { - [1674209548.549831][6888:6890] CHIP:DMG: AttributePathIB = - [1674209548.549836][6888:6890] CHIP:DMG: { - [1674209548.549839][6888:6890] CHIP:DMG: Endpoint = 0x0, - [1674209548.549842][6888:6890] CHIP:DMG: Cluster = 0x1f, - [1674209548.549845][6888:6890] CHIP:DMG: Attribute = 0x0000_0000, - [1674209548.549849][6888:6890] CHIP:DMG: ListIndex = Null, - [1674209548.549852][6888:6890] CHIP:DMG: } - [1674209548.549856][6888:6890] CHIP:DMG: - [1674209548.549859][6888:6890] CHIP:DMG: StatusIB = - [1674209548.549862][6888:6890] CHIP:DMG: { - [1674209548.549865][6888:6890] CHIP:DMG: status = 0x00 (SUCCESS), - [1674209548.549868][6888:6890] CHIP:DMG: }, - [1674209548.549871][6888:6890] CHIP:DMG: - [1674209548.549873][6888:6890] CHIP:DMG: }, - [1674209548.549878][6888:6890] CHIP:DMG: - [1674209548.549881][6888:6890] CHIP:DMG: ], - [1674209548.549887][6888:6890] CHIP:DMG: - [1674209548.549890][6888:6890] CHIP:DMG: InteractionModelRevision = 1 - [1674209548.549892][6888:6890] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml index 1eed00b2831f54..d6fa8b817564f0 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 19.1.2. [TC-SC-5.2] Receiving a group message - TH to DUT +name: 26.1.2. [TC-SC-5.2] Receiving a group message - TH to DUT PICS: - MCORE.ROLE.COMMISSIONEE @@ -21,11 +21,13 @@ PICS: config: nodeId: 0x12344321 cluster: "Groups" + endpoint: 0 + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT - endpoint: 1 + Groups.Endpoint: 1 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -41,10 +43,8 @@ tests: - name: "nodeId" saveAs: commissionerNodeId - - label: "TH adds ACL Operate privileges for Group 0x0103" - PICS: PICS_SDK_CI_ONLY + - label: "Step 1: TH adds ACL Operate privileges for Group 0x0103" cluster: "Access Control" - endpoint: 0 command: "writeAttribute" attribute: "ACL" arguments: @@ -66,84 +66,8 @@ tests: }, ] - - label: "TH adds ACL Operate privileges for Group 0x0103" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": ["0x0103"], "targets": null }]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674197827.380263][1821:1823] CHIP:DMG: WriteResponseMessage = - [1674197827.380335][1821:1823] CHIP:DMG: { - [1674197827.380364][1821:1823] CHIP:DMG: AttributeStatusIBs = - [1674197827.380405][1821:1823] CHIP:DMG: [ - [1674197827.380449][1821:1823] CHIP:DMG: AttributeStatusIB = - [1674197827.380486][1821:1823] CHIP:DMG: { - [1674197827.380541][1821:1823] CHIP:DMG: AttributePathIB = - [1674197827.380582][1821:1823] CHIP:DMG: { - [1674197827.380635][1821:1823] CHIP:DMG: Endpoint = 0x0, - [1674197827.380677][1821:1823] CHIP:DMG: Cluster = 0x1f, - [1674197827.380732][1821:1823] CHIP:DMG: Attribute = 0x0000_0000, - [1674197827.380784][1821:1823] CHIP:DMG: } - [1674197827.380829][1821:1823] CHIP:DMG: - [1674197827.380878][1821:1823] CHIP:DMG: StatusIB = - [1674197827.380918][1821:1823] CHIP:DMG: { - [1674197827.380968][1821:1823] CHIP:DMG: status = 0x00 (SUCCESS), - [1674197827.381010][1821:1823] CHIP:DMG: }, - [1674197827.381061][1821:1823] CHIP:DMG: - [1674197827.381094][1821:1823] CHIP:DMG: }, - [1674197827.381152][1821:1823] CHIP:DMG: - [1674197827.381184][1821:1823] CHIP:DMG: AttributeStatusIB = - [1674197827.381230][1821:1823] CHIP:DMG: { - [1674197827.381263][1821:1823] CHIP:DMG: AttributePathIB = - [1674197827.381301][1821:1823] CHIP:DMG: { - [1674197827.381352][1821:1823] CHIP:DMG: Endpoint = 0x0, - [1674197827.381406][1821:1823] CHIP:DMG: Cluster = 0x1f, - [1674197827.381449][1821:1823] CHIP:DMG: Attribute = 0x0000_0000, - [1674197827.381502][1821:1823] CHIP:DMG: ListIndex = Null, - [1674197827.381543][1821:1823] CHIP:DMG: } - [1674197827.381597][1821:1823] CHIP:DMG: - [1674197827.381635][1821:1823] CHIP:DMG: StatusIB = - [1674197827.381673][1821:1823] CHIP:DMG: { - [1674197827.381725][1821:1823] CHIP:DMG: status = 0x00 (SUCCESS), - [1674197827.381763][1821:1823] CHIP:DMG: }, - [1674197827.381814][1821:1823] CHIP:DMG: - [1674197827.381846][1821:1823] CHIP:DMG: }, - [1674197827.381910][1821:1823] CHIP:DMG: - [1674197827.381942][1821:1823] CHIP:DMG: AttributeStatusIB = - [1674197827.381988][1821:1823] CHIP:DMG: { - [1674197827.382021][1821:1823] CHIP:DMG: AttributePathIB = - [1674197827.382070][1821:1823] CHIP:DMG: { - [1674197827.382109][1821:1823] CHIP:DMG: Endpoint = 0x0, - [1674197827.382161][1821:1823] CHIP:DMG: Cluster = 0x1f, - [1674197827.382204][1821:1823] CHIP:DMG: Attribute = 0x0000_0000, - [1674197827.382255][1821:1823] CHIP:DMG: ListIndex = Null, - [1674197827.382295][1821:1823] CHIP:DMG: } - [1674197827.382349][1821:1823] CHIP:DMG: - [1674197827.382387][1821:1823] CHIP:DMG: StatusIB = - [1674197827.382436][1821:1823] CHIP:DMG: { - [1674197827.382476][1821:1823] CHIP:DMG: status = 0x00 (SUCCESS), - [1674197827.382527][1821:1823] CHIP:DMG: }, - [1674197827.382566][1821:1823] CHIP:DMG: - [1674197827.382599][1821:1823] CHIP:DMG: }, - [1674197827.382650][1821:1823] CHIP:DMG: - [1674197827.382681][1821:1823] CHIP:DMG: ], - [1674197827.382729][1821:1823] CHIP:DMG: - [1674197827.382759][1821:1823] CHIP:DMG: InteractionModelRevision = 1 - [1674197827.382789][1821:1823] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends KeySetWrite command with TH key" - PICS: PICS_SDK_CI_ONLY + - label: "Step 2: TH sends KeySetWrite command with TH key" cluster: "Group Key Management" - endpoint: 0 command: "KeySetWrite" arguments: values: @@ -160,125 +84,25 @@ tests: EpochStartTime2: 2220002, } - - label: "TH sends KeySetWrite command with TH key" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3","groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674198053.466794][1826:1829] CHIP:DMG: InvokeResponseMessage = - [1674198053.466849][1826:1829] CHIP:DMG: { - [1674198053.466903][1826:1829] CHIP:DMG: suppressResponse = false, - [1674198053.466962][1826:1829] CHIP:DMG: InvokeResponseIBs = - [1674198053.467036][1826:1829] CHIP:DMG: [ - [1674198053.467093][1826:1829] CHIP:DMG: InvokeResponseIB = - [1674198053.467170][1826:1829] CHIP:DMG: { - [1674198053.467231][1826:1829] CHIP:DMG: CommandStatusIB = - [1674198053.467304][1826:1829] CHIP:DMG: { - [1674198053.467371][1826:1829] CHIP:DMG: CommandPathIB = - [1674198053.467449][1826:1829] CHIP:DMG: { - [1674198053.467525][1826:1829] CHIP:DMG: EndpointId = 0x0, - [1674198053.467606][1826:1829] CHIP:DMG: ClusterId = 0x3f, - [1674198053.467691][1826:1829] CHIP:DMG: CommandId = 0x0, - [1674198053.467769][1826:1829] CHIP:DMG: }, - [1674198053.467854][1826:1829] CHIP:DMG: - [1674198053.467922][1826:1829] CHIP:DMG: StatusIB = - [1674198053.467999][1826:1829] CHIP:DMG: { - [1674198053.468076][1826:1829] CHIP:DMG: status = 0x00 (SUCCESS), - [1674198053.468154][1826:1829] CHIP:DMG: }, - [1674198053.468231][1826:1829] CHIP:DMG: - [1674198053.468338][1826:1829] CHIP:DMG: }, - [1674198053.468419][1826:1829] CHIP:DMG: - [1674198053.468479][1826:1829] CHIP:DMG: }, - [1674198053.468550][1826:1829] CHIP:DMG: - [1674198053.468606][1826:1829] CHIP:DMG: ], - [1674198053.468676][1826:1829] CHIP:DMG: - [1674198053.468731][1826:1829] CHIP:DMG: InteractionModelRevision = 1 - [1674198053.468788][1826:1829] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH binds GroupId to GroupKeySet" - PICS: PICS_SDK_CI_ONLY + - label: "Step 3: TH binds GroupId to GroupKeySet" cluster: "Group Key Management" - endpoint: 0 command: "writeAttribute" attribute: "GroupKeyMap" arguments: value: [ - { FabricIndex: 1, GroupId: 0x0101, GroupKeySetID: 0x01a3 }, { FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }, + { FabricIndex: 1, GroupId: 0x0101, GroupKeySetID: 0x01a3 }, ] - - label: "TH binds GroupId to GroupKeySet" - verification: | - ./chip-tool groupkeymanagement write group-key-map '[{"groupId": "0x0103", "groupKeySetID": "0x01a3", "fabricIndex": 1},{"groupId": "0x0101", "groupKeySetID": "0x01a3", "fabricIndex": 1}]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674198154.629775][1837:1839] CHIP:DMG: WriteResponseMessage = - [1674198154.629832][1837:1839] CHIP:DMG: { - [1674198154.629908][1837:1839] CHIP:DMG: AttributeStatusIBs = - [1674198154.629983][1837:1839] CHIP:DMG: [ - [1674198154.630064][1837:1839] CHIP:DMG: AttributeStatusIB = - [1674198154.630105][1837:1839] CHIP:DMG: { - [1674198154.630142][1837:1839] CHIP:DMG: AttributePathIB = - [1674198154.630178][1837:1839] CHIP:DMG: { - [1674198154.630290][1837:1839] CHIP:DMG: Endpoint = 0x0, - [1674198154.630325][1837:1839] CHIP:DMG: Cluster = 0x3f, - [1674198154.630358][1837:1839] CHIP:DMG: Attribute = 0x0000_0000, - [1674198154.630400][1837:1839] CHIP:DMG: } - [1674198154.630437][1837:1839] CHIP:DMG: - [1674198154.630476][1837:1839] CHIP:DMG: StatusIB = - [1674198154.630508][1837:1839] CHIP:DMG: { - [1674198154.630549][1837:1839] CHIP:DMG: status = 0x00 (SUCCESS), - [1674198154.630581][1837:1839] CHIP:DMG: }, - [1674198154.630621][1837:1839] CHIP:DMG: - [1674198154.630648][1837:1839] CHIP:DMG: }, - [1674198154.630695][1837:1839] CHIP:DMG: - [1674198154.630721][1837:1839] CHIP:DMG: AttributeStatusIB = - [1674198154.630748][1837:1839] CHIP:DMG: { - [1674198154.630784][1837:1839] CHIP:DMG: AttributePathIB = - [1674198154.630814][1837:1839] CHIP:DMG: { - [1674198154.630854][1837:1839] CHIP:DMG: Endpoint = 0x0, - [1674198154.630887][1837:1839] CHIP:DMG: Cluster = 0x3f, - [1674198154.630929][1837:1839] CHIP:DMG: Attribute = 0x0000_0000, - [1674198154.630964][1837:1839] CHIP:DMG: ListIndex = Null, - [1674198154.631004][1837:1839] CHIP:DMG: } - [1674198154.631039][1837:1839] CHIP:DMG: - [1674198154.631077][1837:1839] CHIP:DMG: StatusIB = - [1674198154.631108][1837:1839] CHIP:DMG: { - [1674198154.631148][1837:1839] CHIP:DMG: status = 0x00 (SUCCESS), - [1674198154.631179][1837:1839] CHIP:DMG: }, - [1674198154.631208][1837:1839] CHIP:DMG: - [1674198154.631244][1837:1839] CHIP:DMG: }, - [1674198154.631275][1837:1839] CHIP:DMG: - [1674198154.631310][1837:1839] CHIP:DMG: ], - [1674198154.631345][1837:1839] CHIP:DMG: - [1674198154.631378][1837:1839] CHIP:DMG: InteractionModelRevision = 1 - [1674198154.631403][1837:1839] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends RemoveAllGroups command" + - label: + "Step 4: TH sends RemoveAllGroups command to the DUT on + PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "RemoveAllGroups" - - label: "TH sends AddGroup command" + - label: "Step 5: TH sends AddGroup command to the DUT on PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "AddGroup" arguments: values: @@ -294,7 +118,8 @@ tests: value: 0x0103 - label: - "TH sends AddGroup command again but using group messaging (0x0103)" + "Step 6: TH sends AddGroup command again but using group messaging + (0x0103)" groupId: 0x0103 command: "AddGroup" arguments: @@ -325,8 +150,9 @@ tests: - name: "expectedValue" value: "y" - - label: "TH sends ViewGroup command" + - label: "Step 7: TH sends ViewGroup command on Endpoint PIXIT.G.ENDPOINT " PICS: G.S.F00 + endpoint: Groups.Endpoint command: "ViewGroup" arguments: values: @@ -341,8 +167,9 @@ tests: - name: GroupName value: "Test Group 0101" - - label: "TH sends ViewGroup command" + - label: "Step 8: TH sends ViewGroup command on Endpoint PIXIT.G.ENDPOINT " PICS: "!(G.S.F00)" + endpoint: Groups.Endpoint command: "ViewGroup" arguments: values: @@ -357,68 +184,22 @@ tests: - name: GroupName value: "" - - label: "TH removes the GroupKeySet" + - label: "Step 9: TH removes the GroupKeySet" cluster: "Group Key Management" - PICS: PICS_SDK_CI_ONLY - endpoint: 0 command: "KeySetRemove" arguments: values: - name: GroupKeySetID value: 0x01a3 - - label: "TH removes the GroupKeySet" - verification: | - ./chip-tool groupkeymanagement key-set-remove "0x01a3" 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674199244.259870][1870:1872] CHIP:DMG: InvokeResponseMessage = - [1674199244.259895][1870:1872] CHIP:DMG: { - [1674199244.259918][1870:1872] CHIP:DMG: suppressResponse = false, - [1674199244.259943][1870:1872] CHIP:DMG: InvokeResponseIBs = - [1674199244.259975][1870:1872] CHIP:DMG: [ - [1674199244.259999][1870:1872] CHIP:DMG: InvokeResponseIB = - [1674199244.260035][1870:1872] CHIP:DMG: { - [1674199244.260061][1870:1872] CHIP:DMG: CommandStatusIB = - [1674199244.260093][1870:1872] CHIP:DMG: { - [1674199244.260120][1870:1872] CHIP:DMG: CommandPathIB = - [1674199244.260154][1870:1872] CHIP:DMG: { - [1674199244.260187][1870:1872] CHIP:DMG: EndpointId = 0x0, - [1674199244.260222][1870:1872] CHIP:DMG: ClusterId = 0x3f, - [1674199244.260257][1870:1872] CHIP:DMG: CommandId = 0x3, - [1674199244.260305][1870:1872] CHIP:DMG: }, - [1674199244.260344][1870:1872] CHIP:DMG: - [1674199244.260373][1870:1872] CHIP:DMG: StatusIB = - [1674199244.260406][1870:1872] CHIP:DMG: { - [1674199244.260443][1870:1872] CHIP:DMG: status = 0x00 (SUCCESS), - [1674199244.260476][1870:1872] CHIP:DMG: }, - [1674199244.260507][1870:1872] CHIP:DMG: - [1674199244.260536][1870:1872] CHIP:DMG: }, - [1674199244.260569][1870:1872] CHIP:DMG: - [1674199244.260595][1870:1872] CHIP:DMG: }, - [1674199244.260625][1870:1872] CHIP:DMG: - [1674199244.260650][1870:1872] CHIP:DMG: ], - [1674199244.260680][1870:1872] CHIP:DMG: - [1674199244.260704][1870:1872] CHIP:DMG: InteractionModelRevision = 1 - [1674199244.260728][1870:1872] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH cleans up groups using RemoveAllGroups command" + - label: + "Step 10: TH cleans up groups using RemoveAllGroups command to the DUT + on PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "RemoveAllGroups" - - label: "TH removes ACL Operate privileges for Group 0x0103" - PICS: PICS_SDK_CI_ONLY + - label: "Step 11: TH removes ACL Operate privileges for Group 0x0103" cluster: "Access Control" - endpoint: 0 command: "writeAttribute" attribute: "ACL" arguments: @@ -432,60 +213,3 @@ tests: Targets: null, }, ] - - - label: "TH removes ACL Operate privileges for Group 0x0103" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null }]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674209548.549754][6888:6890] CHIP:DMG: WriteResponseMessage = - [1674209548.549758][6888:6890] CHIP:DMG: { - [1674209548.549760][6888:6890] CHIP:DMG: AttributeStatusIBs = - [1674209548.549765][6888:6890] CHIP:DMG: [ - [1674209548.549768][6888:6890] CHIP:DMG: AttributeStatusIB = - [1674209548.549772][6888:6890] CHIP:DMG: { - [1674209548.549775][6888:6890] CHIP:DMG: AttributePathIB = - [1674209548.549779][6888:6890] CHIP:DMG: { - [1674209548.549782][6888:6890] CHIP:DMG: Endpoint = 0x0, - [1674209548.549786][6888:6890] CHIP:DMG: Cluster = 0x1f, - [1674209548.549789][6888:6890] CHIP:DMG: Attribute = 0x0000_0000, - [1674209548.549792][6888:6890] CHIP:DMG: } - [1674209548.549797][6888:6890] CHIP:DMG: - [1674209548.549800][6888:6890] CHIP:DMG: StatusIB = - [1674209548.549804][6888:6890] CHIP:DMG: { - [1674209548.549807][6888:6890] CHIP:DMG: status = 0x00 (SUCCESS), - [1674209548.549810][6888:6890] CHIP:DMG: }, - [1674209548.549813][6888:6890] CHIP:DMG: - [1674209548.549816][6888:6890] CHIP:DMG: }, - [1674209548.549823][6888:6890] CHIP:DMG: - [1674209548.549825][6888:6890] CHIP:DMG: AttributeStatusIB = - [1674209548.549828][6888:6890] CHIP:DMG: { - [1674209548.549831][6888:6890] CHIP:DMG: AttributePathIB = - [1674209548.549836][6888:6890] CHIP:DMG: { - [1674209548.549839][6888:6890] CHIP:DMG: Endpoint = 0x0, - [1674209548.549842][6888:6890] CHIP:DMG: Cluster = 0x1f, - [1674209548.549845][6888:6890] CHIP:DMG: Attribute = 0x0000_0000, - [1674209548.549849][6888:6890] CHIP:DMG: ListIndex = Null, - [1674209548.549852][6888:6890] CHIP:DMG: } - [1674209548.549856][6888:6890] CHIP:DMG: - [1674209548.549859][6888:6890] CHIP:DMG: StatusIB = - [1674209548.549862][6888:6890] CHIP:DMG: { - [1674209548.549865][6888:6890] CHIP:DMG: status = 0x00 (SUCCESS), - [1674209548.549868][6888:6890] CHIP:DMG: }, - [1674209548.549871][6888:6890] CHIP:DMG: - [1674209548.549873][6888:6890] CHIP:DMG: }, - [1674209548.549878][6888:6890] CHIP:DMG: - [1674209548.549881][6888:6890] CHIP:DMG: ], - [1674209548.549887][6888:6890] CHIP:DMG: - [1674209548.549890][6888:6890] CHIP:DMG: InteractionModelRevision = 1 - [1674209548.549892][6888:6890] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 0264ad8fe3be8d..a2779de3cf5cd9 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -2174,116 +2174,6 @@ ACFREMON.S.A0002=1 ACFREMON.S.A0003=1 ACFREMON.S.C00.Rsp=0 -# Ceramic Filter Monitoring Cluster -CFREMON.S=1 -CFREMON.C=0 -CFREMON.S.F00=1 -CFREMON.S.F01=1 -CFREMON.S.A0000=1 -CFREMON.S.A0001=1 -CFREMON.S.A0002=1 -CFREMON.S.A0003=1 -CFREMON.S.C00.Rsp=0 - -# Electrostatic Filter Monitoring Cluster -ESFREMON.S=1 -ESFREMON.C=0 -ESFREMON.S.F00=1 -ESFREMON.S.F01=1 -ESFREMON.S.A0000=1 -ESFREMON.S.A0001=1 -ESFREMON.S.A0002=1 -ESFREMON.S.A0003=1 -ESFREMON.S.C00.Rsp=0 - -# Fuel Tank Monitoring Cluster -FTREMON.S=1 -FTREMON.C=0 -FTREMON.S.F00=1 -FTREMON.S.F01=1 -FTREMON.S.A0000=1 -FTREMON.S.A0001=1 -FTREMON.S.A0002=1 -FTREMON.S.A0003=1 -FTREMON.S.C00.Rsp=0 - -# Ink Cartridge Monitoring Cluster -INKCREMON.S=1 -INKCREMON.C=0 -INKCREMON.S.F00=1 -INKCREMON.S.F01=1 -INKCREMON.S.A0000=1 -INKCREMON.S.A0001=1 -INKCREMON.S.A0002=1 -INKCREMON.S.A0003=1 -INKCREMON.S.C00.Rsp=0 - -# Ionizing Filter Monitoring Cluster -IONFREMON.S=1 -IONFREMON.C=0 -IONFREMON.S.F00=1 -IONFREMON.S.F01=1 -IONFREMON.S.A0000=1 -IONFREMON.S.A0001=1 -IONFREMON.S.A0002=1 -IONFREMON.S.A0003=1 -IONFREMON.S.C00.Rsp=0 - -# Ozone Filter Monitoring Cluster -OZFREMON.S=1 -OZFREMON.C=0 -OZFREMON.S.F00=1 -OZFREMON.S.F01=1 -OZFREMON.S.A0000=1 -OZFREMON.S.A0001=1 -OZFREMON.S.A0002=1 -OZFREMON.S.A0003=1 -OZFREMON.S.C00.Rsp=0 - -# Toner Cartridge Monitoring Cluster -TCREMON.S=1 -TCREMON.C=0 -TCREMON.S.F00=1 -TCREMON.S.F01=1 -TCREMON.S.A0000=1 -TCREMON.S.A0001=1 -TCREMON.S.A0002=1 -TCREMON.S.A0003=1 -TCREMON.S.C00.Rsp=0 - -# UV Filter Monitoring Cluster -UVFREMON.S=1 -UVFREMON.C=0 -UVFREMON.S.F00=1 -UVFREMON.S.F01=1 -UVFREMON.S.A0000=1 -UVFREMON.S.A0001=1 -UVFREMON.S.A0002=1 -UVFREMON.S.A0003=1 -UVFREMON.S.C00.Rsp=0 - -# Water Tank Monitoring Cluster -WTREMON.S=1 -WTREMON.C=0 -WTREMON.S.F00=1 -WTREMON.S.F01=1 -WTREMON.S.A0000=1 -WTREMON.S.A0001=1 -WTREMON.S.A0002=1 -WTREMON.S.A0003=1 -WTREMON.S.C00.Rsp=0 - -# Zeolite Filter Monitoring Cluster -ZEOFREMON.S=1 -ZEOFREMON.C=0 -ZEOFREMON.S.F00=1 -ZEOFREMON.S.F01=1 -ZEOFREMON.S.A0000=1 -ZEOFREMON.S.A0001=1 -ZEOFREMON.S.A0002=1 -ZEOFREMON.S.A0003=1 -ZEOFREMON.S.C00.Rsp=0 - # Air Quality AIRQUAL.C=0 AIRQUAL.S=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 30188793e63fc4..d17cefb26d578e 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -3,7 +3,6 @@ "TestAccessControlCluster", "Test_TC_ACL_1_1", "Test_TC_ACL_2_1", - "Test_TC_ACL_2_2", "Test_TC_ACL_2_3", "Test_TC_ACL_2_4", "Test_TC_ACL_2_7", @@ -127,8 +126,6 @@ "Test_TC_APPLAUNCHER_3_5", "Test_TC_APPLAUNCHER_3_6", "Test_TC_APPLAUNCHER_3_7", - "Test_TC_APPLAUNCHER_3_8", - "Test_TC_APPLAUNCHER_3_9", "Test_TC_MEDIAINPUT_3_10", "Test_TC_MEDIAINPUT_3_11", "Test_TC_MEDIAINPUT_3_12", @@ -175,7 +172,7 @@ ], "PowerSourceConfiguration": ["Test_TC_PSCFG_1_1", "Test_TC_PSCFG_2_1"], "RelativeHumidityMeasurement": ["Test_TC_RH_1_1", "Test_TC_RH_2_1"], - "SecureChannel": ["Test_TC_SC_5_1", "Test_TC_SC_5_2"], + "SecureChannel": [], "Switch": ["Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1"], "TemperatureMeasurement": ["Test_TC_TMP_1_1", "Test_TC_TMP_2_1"], "Thermostat": ["Test_TC_TSTAT_1_1", "Test_TC_TSTAT_2_1"], @@ -257,7 +254,8 @@ "TestLevelControlWithOnOffDependency", "TestCommissioningWindow", "TestCommissionerNodeId", - "TestTimeSynchronization" + "TestTimeSynchronization", + "TestOperationalState" ], "MultiAdmin": ["TestMultiAdmin"], "SoftwareDiagnostics": ["Test_TC_DGSW_1_1"], @@ -288,31 +286,11 @@ "Test_TC_G_2_1" ], "Scenes": ["Test_TC_S_1_1"], - "ReplaceableMonitoring": [ + "ResourceMonitoring": [ "Test_TC_ACFREMON_1_1", "Test_TC_ACFREMON_2_1", - "Test_TC_CFREMON_1_1", - "Test_TC_CFREMON_2_1", - "Test_TC_ESFREMON_1_1", - "Test_TC_ESFREMON_2_1", - "Test_TC_FTREMON_1_1", - "Test_TC_FTREMON_2_1", "Test_TC_HEPAFREMON_1_1", - "Test_TC_HEPAFREMON_2_1", - "Test_TC_INKCREMON_1_1", - "Test_TC_INKCREMON_2_1", - "Test_TC_IONFREMON_1_1", - "Test_TC_IONFREMON_2_1", - "Test_TC_OZFREMON_1_1", - "Test_TC_OZFREMON_2_1", - "Test_TC_TCREMON_1_1", - "Test_TC_TCREMON_2_1", - "Test_TC_UVFREMON_1_1", - "Test_TC_UVFREMON_2_1", - "Test_TC_WTREMON_1_1", - "Test_TC_WTREMON_2_1", - "Test_TC_ZEOFREMON_1_1", - "Test_TC_ZEOFREMON_2_1" + "Test_TC_HEPAFREMON_2_1" ], "AirQuality": ["Test_TC_AIRQUAL_1_1", "Test_TC_AIRQUAL_2_1"], "ConcentrationMeasurement": [ @@ -391,6 +369,6 @@ "Subscriptions", "DoorLock", "Groups", - "ReplaceableMonitoring" + "ResourceMonitoring" ] } diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.h b/src/app/tests/suites/commands/interaction_model/InteractionModel.h index 1d3e2eb735e116..846dd6ab3c33ea 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.h +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.h @@ -234,12 +234,11 @@ class InteractionModelCommands chip::app::CommandPathParams commandPath = { endpointId, clusterId, commandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; - auto commandSender = std::make_unique(mCallback, device->GetExchangeManager(), - mTimedInteractionTimeoutMs.HasValue()); + auto commandSender = std::make_unique( + mCallback, device->GetExchangeManager(), mTimedInteractionTimeoutMs.HasValue(), mSuppressResponse.ValueOr(false)); VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(commandSender->AddRequestDataNoTimedCheck(commandPath, value, mTimedInteractionTimeoutMs, - mSuppressResponse.ValueOr(false))); + ReturnErrorOnFailure(commandSender->AddRequestDataNoTimedCheck(commandPath, value, mTimedInteractionTimeoutMs)); ReturnErrorOnFailure(commandSender->SendCommandRequest(device->GetSecureSession().Value())); mCommandSender.push_back(std::move(commandSender)); diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 5fd2b511e5caa1..1d420ee1fc830c 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -65,7 +65,6 @@ "Test_TC_DA_1_6" ], "DeviceManagement": [ - "Test_TC_BINFO_2_2", "Test_TC_BINFO_2_4", "Test_TC_OPCREDS_3_1", "Test_TC_OPCREDS_3_2", diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index ed27deaa540461..7ae0d174062133 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -159,6 +159,7 @@ void MatterPm1ConcentrationMeasurementPluginServerInitCallback() {} void MatterPm25ConcentrationMeasurementPluginServerInitCallback() {} void MatterRadonConcentrationMeasurementPluginServerInitCallback() {} void MatterTotalVolatileOrganicCompoundsConcentrationMeasurementPluginServerInitCallback() {} +void MatterOperationalStatePluginServerInitCallback() {} // **************************************** // Print out information about each cluster // **************************************** diff --git a/src/app/zap-templates/templates/app/cluster-objects-src.zapt b/src/app/zap-templates/templates/app/cluster-objects-src.zapt index 8a6e7c805d79de..6305555de4fe27 100644 --- a/src/app/zap-templates/templates/app/cluster-objects-src.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects-src.zapt @@ -34,13 +34,13 @@ namespace Structs { namespace Commands { {{#zcl_commands}} namespace {{asUpperCamelCase name}} { -CHIP_ERROR Type::Encode(TLV::TLVWriter &writer, TLV::Tag tag) const{ +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const{ TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); {{#zcl_command_arguments}} - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::k{{asUpperCamelCase label}}), {{asLowerCamelCase label}})); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::k{{asUpperCamelCase label}}), {{asLowerCamelCase label}})); {{/zcl_command_arguments}} - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -94,17 +94,17 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader &reader, const Concret namespace Events { {{#zcl_events}} namespace {{asUpperCamelCase name}} { -CHIP_ERROR Type::Encode(TLV::TLVWriter &writer, TLV::Tag tag) const{ +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const{ TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); {{#zcl_event_fields}} {{#if_is_fabric_scoped_struct type}} - ReturnErrorOnFailure(DataModel::EncodeForRead(writer, TLV::ContextTag(Fields::k{{asUpperCamelCase name}}), GetFabricIndex(), {{asLowerCamelCase name}})); + ReturnErrorOnFailure(DataModel::EncodeForRead(aWriter, TLV::ContextTag(Fields::k{{asUpperCamelCase name}}), GetFabricIndex(), {{asLowerCamelCase name}})); {{else}} - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::k{{asUpperCamelCase name}}), {{asLowerCamelCase name}})); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::k{{asUpperCamelCase name}}), {{asLowerCamelCase name}})); {{/if_is_fabric_scoped_struct}} {{/zcl_event_fields}} - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 0ed26f740fa34d..9b4fe04b4341a9 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -101,7 +101,7 @@ public: {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}{{> cluster_objects_field_init}}; {{/zcl_command_arguments}} - CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = {{~#if responseName}} @@ -189,7 +189,7 @@ public: } {{/if}} - CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml index e454bbee517ae3..0a4c0172ea2625 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml @@ -63,7 +63,7 @@ limitations under the License. CurrentPhase CountdownTime OperationalStateList - OperationalState + OperationalState OperationalError diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml index 94c10eb297a5d3..4943d0a8fd61a3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml @@ -51,7 +51,13 @@ limitations under the License. CurrentPhase CountdownTime OperationalStateList - OperationalState + + + OperationalState OperationalError diff --git a/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml index a6dc0fe72e85dd..83eb6ffeda9d80 100644 --- a/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml @@ -18,7 +18,7 @@ limitations under the License. - Closures + Measurement & Sensing Smoke CO Alarm 0x005C SMOKE_CO_ALARM_CLUSTER @@ -57,35 +57,40 @@ limitations under the License. - + This event SHALL be generated when SmokeState attribute changes to either Warning or Critical state. + - + This event SHALL be generated when COState attribute changes to either Warning or Critical state. + This event SHALL be generated when BatteryAlert attribute changes to either Warning or Critical state. + This event SHALL be generated when the device detects a hardware fault that leads to setting HardwareFaultAlert to True. - This event SHALL be generated when the EndOfServiceAlert is set to True. + This event SHALL be generated when the EndOfServiceAlert is set to Expired. This event SHALL be generated when the SelfTest completes, and the attribute TestInProgress changes to False. - This event SHALL be generated when the DeviceMuted attribute changes to True. + This event SHALL be generated when the DeviceMuted attribute changes to Muted. This event SHALL be generated when DeviceMuted attribute changes to NotMuted. - - This event SHALL be generated when the device hosting the cluster receives a smoke alarm from an interconnected sensor. + + This event SHALL be generated when the device hosting the server receives a smoke alarm from an interconnected sensor. + - - This event SHALL be generated when the device hosting the cluster receives a CO alarm from an interconnected sensor. + + This event SHALL be generated when the device hosting the server receives a smoke alarm from an interconnected sensor. + This event SHALL be generated when ExpressedState attribute returns to Normal state. diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 83c069ef5c4744..cb0910fc0910c8 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -306,8 +306,34 @@ "DSTOffsetListMaxSize" ], "Temperature Control": ["SupportedTemperatureLevels"], - "Operational State": ["OperationalState", "OperationalError"], - "RVC Operational State": ["OperationalState", "OperationalError"] + "Operational State": [ + "OperationalState", + "OperationalError", + "CurrentPhase", + "CountdownTime" + ], + "RVC Operational State": [ + "OperationalState", + "OperationalError", + "CurrentPhase", + "CountdownTime" + ], + "Activated Carbon Filter Monitoring": [ + "Condition", + "DegradationDirection", + "ChangeIndication", + "InPlaceIndicator", + "LastChangedTime", + "FeatureMap" + ], + "HEPA Filter Monitoring": [ + "Condition", + "DegradationDirection", + "ChangeIndication", + "InPlaceIndicator", + "LastChangedTime", + "FeatureMap" + ] }, "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index b6554bf6854653..fe4753092f1d67 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -304,8 +304,34 @@ "DSTOffsetListMaxSize" ], "Temperature Control": ["SupportedTemperatureLevels"], - "Operational State": ["OperationalState", "OperationalError"], - "RVC Operational State": ["OperationalState", "OperationalError"] + "Operational State": [ + "OperationalState", + "OperationalError", + "CurrentPhase", + "CountdownTime" + ], + "RVC Operational State": [ + "OperationalState", + "OperationalError", + "CurrentPhase", + "CountdownTime" + ], + "Activated Carbon Filter Monitoring": [ + "Condition", + "DegradationDirection", + "ChangeIndication", + "InPlaceIndicator", + "LastChangedTime", + "FeatureMap" + ], + "HEPA Filter Monitoring": [ + "Condition", + "DegradationDirection", + "ChangeIndication", + "InPlaceIndicator", + "LastChangedTime", + "FeatureMap" + ] }, "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index 6063b942e3c11a..4677ddd80d49b2 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -152,7 +152,9 @@ "ACCESS_CONTROL_CLUSTER": ["access-control-server"], "ACCOUNT_LOGIN_CLUSTER": ["account-login-server"], "ACTIONS_CLUSTER": [], - "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER": [], + "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER": [ + "resource-monitoring-server" + ], "ADMINISTRATOR_COMMISSIONING_CLUSTER": [ "administrator-commissioning-server" ], @@ -212,7 +214,7 @@ "GROUPS_CLUSTER": ["groups-server"], "GROUP_KEY_MANAGEMENT_CLUSTER": ["group-key-mgmt-server"], "HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER": [], - "HEPA_FILTER_MONITORING_CLUSTER": [], + "HEPA_FILTER_MONITORING_CLUSTER": ["resource-monitoring-server"], "HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [], "HYDROGEN_SULFIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], "IAS_ZONE_CLUSTER": [], @@ -240,6 +242,7 @@ "ON_OFF_CLUSTER": ["on-off-server"], "ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [], "OPERATIONAL_CREDENTIALS_CLUSTER": ["operational-credentials-server"], + "OPERATIONAL_STATE_CLUSTER": ["operational-state-server"], "OTA_BOOTLOAD_CLUSTER": [], "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": ["ota-provider"], "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": ["ota-requestor"], diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 5ba5df68dd1129..db6f89b02be15c 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3208,13 +3208,16 @@ client cluster SmokeCoAlarm = 92 { kCOAlarm = 0x2; } - info event SmokeAlarm = 0 { + critical event SmokeAlarm = 0 { + AlarmStateEnum alarmSeverityLevel = 0; } - info event COAlarm = 1 { + critical event COAlarm = 1 { + AlarmStateEnum alarmSeverityLevel = 0; } info event LowBattery = 2 { + AlarmStateEnum alarmSeverityLevel = 0; } info event HardwareFault = 3 { @@ -3232,10 +3235,12 @@ client cluster SmokeCoAlarm = 92 { info event MuteEnded = 7 { } - info event InterconnectSmokeAlarm = 8 { + critical event InterconnectSmokeAlarm = 8 { + AlarmStateEnum alarmSeverityLevel = 0; } - info event InterconnectCOAlarm = 9 { + critical event InterconnectCOAlarm = 9 { + AlarmStateEnum alarmSeverityLevel = 0; } info event AllClear = 10 { @@ -3349,7 +3354,7 @@ client cluster OperationalState = 96 { readonly attribute nullable int8u currentPhase = 1; readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; - readonly attribute OperationalStateStruct operationalState = 4; + readonly attribute OperationalStateEnum operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3416,7 +3421,7 @@ client cluster RvcOperationalState = 97 { readonly attribute nullable int8u currentPhase = 1; readonly attribute optional nullable elapsed_s countdownTime = 2; readonly attribute OperationalStateStruct operationalStateList[] = 3; - readonly attribute OperationalStateStruct operationalState = 4; + readonly attribute enum8 operationalState = 4; readonly attribute ErrorStateStruct operationalError = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index a4e3c7438bedbb..85c49e835d5a9b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -7432,6 +7432,17 @@ private static Map readOperationalStateInteractionInfo( readOperationalStateOperationalStateListCommandParams ); result.put("readOperationalStateListAttribute", readOperationalStateOperationalStateListAttributeInteractionInfo); + Map readOperationalStateOperationalStateCommandParams = new LinkedHashMap(); + InteractionInfo readOperationalStateOperationalStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OperationalStateCluster) cluster).readOperationalStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readOperationalStateOperationalStateCommandParams + ); + result.put("readOperationalStateAttribute", readOperationalStateOperationalStateAttributeInteractionInfo); Map readOperationalStateGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readOperationalStateGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7546,6 +7557,17 @@ private static Map readRvcOperationalStateInteractionIn readRvcOperationalStateOperationalStateListCommandParams ); result.put("readOperationalStateListAttribute", readRvcOperationalStateOperationalStateListAttributeInteractionInfo); + Map readRvcOperationalStateOperationalStateCommandParams = new LinkedHashMap(); + InteractionInfo readRvcOperationalStateOperationalStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RvcOperationalStateCluster) cluster).readOperationalStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readRvcOperationalStateOperationalStateCommandParams + ); + result.put("readOperationalStateAttribute", readRvcOperationalStateOperationalStateAttributeInteractionInfo); Map readRvcOperationalStateGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readRvcOperationalStateGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/src/chip/devicecontroller/model/ChipEventPath.java b/src/controller/java/src/chip/devicecontroller/model/ChipEventPath.java index 5f6f7c6dcd6be5..f3798cc826047c 100644 --- a/src/controller/java/src/chip/devicecontroller/model/ChipEventPath.java +++ b/src/controller/java/src/chip/devicecontroller/model/ChipEventPath.java @@ -83,7 +83,7 @@ public static ChipEventPath newInstance( } /** Create a new {@link ChipEventPath} with only concrete ids. */ - public static ChipEventPath newInstance(long endpointId, long clusterId, long eventId) { + public static ChipEventPath newInstance(int endpointId, long clusterId, long eventId) { return new ChipEventPath( ChipPathId.forId(endpointId), ChipPathId.forId(clusterId), diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index f1813681f553ba..b3f8a26e4332be 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -15134,45 +15134,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_operationalStateID; - std::string value_operationalStateIDClassName = "java/lang/Integer"; - std::string value_operationalStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_operationalStateIDClassName.c_str(), - value_operationalStateIDCtorSignature.c_str(), - cppValue.operationalStateID, value_operationalStateID); - jobject value_operationalStateLabel; - if (!cppValue.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_operationalStateLabel); - } - else - { - jobject value_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.operationalStateLabel.Value(), - value_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(value_operationalStateLabelInsideOptional, - value_operationalStateLabel); - } - - jclass operationalStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); - return nullptr; - } - jmethodID operationalStateStructStructCtor_0 = - env->GetMethodID(operationalStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); - if (operationalStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); - return nullptr; - } - - value = env->NewObject(operationalStateStructStructClass_0, operationalStateStructStructCtor_0, - value_operationalStateID, value_operationalStateLabel); + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + static_cast(cppValue), value); return value; } case Attributes::OperationalError::Id: { @@ -15511,45 +15476,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_operationalStateID; - std::string value_operationalStateIDClassName = "java/lang/Integer"; - std::string value_operationalStateIDCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_operationalStateIDClassName.c_str(), - value_operationalStateIDCtorSignature.c_str(), - cppValue.operationalStateID, value_operationalStateID); - jobject value_operationalStateLabel; - if (!cppValue.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_operationalStateLabel); - } - else - { - jobject value_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.operationalStateLabel.Value(), - value_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(value_operationalStateLabelInsideOptional, - value_operationalStateLabel); - } - - jclass operationalStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); - return nullptr; - } - jmethodID operationalStateStructStructCtor_0 = - env->GetMethodID(operationalStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); - if (operationalStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); - return nullptr; - } - - value = env->NewObject(operationalStateStructStructClass_0, operationalStateStructStructCtor_0, - value_operationalStateID, value_operationalStateLabel); + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); return value; } case Attributes::OperationalError::Id: { diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 96c6f70a45ff5b..e4895627f54124 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -2578,6 +2578,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_alarmSeverityLevel; + std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; + std::string value_alarmSeverityLevelCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), + static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jclass smokeAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$SmokeCoAlarmClusterSmokeAlarmEvent", smokeAlarmStructClass); @@ -2586,14 +2593,14 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & ChipLogError(Zcl, "Could not find class ChipEventStructs$SmokeCoAlarmClusterSmokeAlarmEvent"); return nullptr; } - jmethodID smokeAlarmStructCtor = env->GetMethodID(smokeAlarmStructClass, "", "()V"); + jmethodID smokeAlarmStructCtor = env->GetMethodID(smokeAlarmStructClass, "", "(Ljava/lang/Integer;)V"); if (smokeAlarmStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$SmokeCoAlarmClusterSmokeAlarmEvent constructor"); return nullptr; } - jobject value = env->NewObject(smokeAlarmStructClass, smokeAlarmStructCtor); + jobject value = env->NewObject(smokeAlarmStructClass, smokeAlarmStructCtor, value_alarmSeverityLevel); return value; } @@ -2604,6 +2611,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_alarmSeverityLevel; + std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; + std::string value_alarmSeverityLevelCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), + static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jclass COAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$SmokeCoAlarmClusterCOAlarmEvent", COAlarmStructClass); @@ -2612,14 +2626,14 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & ChipLogError(Zcl, "Could not find class ChipEventStructs$SmokeCoAlarmClusterCOAlarmEvent"); return nullptr; } - jmethodID COAlarmStructCtor = env->GetMethodID(COAlarmStructClass, "", "()V"); + jmethodID COAlarmStructCtor = env->GetMethodID(COAlarmStructClass, "", "(Ljava/lang/Integer;)V"); if (COAlarmStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$SmokeCoAlarmClusterCOAlarmEvent constructor"); return nullptr; } - jobject value = env->NewObject(COAlarmStructClass, COAlarmStructCtor); + jobject value = env->NewObject(COAlarmStructClass, COAlarmStructCtor, value_alarmSeverityLevel); return value; } @@ -2630,6 +2644,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_alarmSeverityLevel; + std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; + std::string value_alarmSeverityLevelCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), + static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jclass lowBatteryStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$SmokeCoAlarmClusterLowBatteryEvent", lowBatteryStructClass); @@ -2638,14 +2659,14 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & ChipLogError(Zcl, "Could not find class ChipEventStructs$SmokeCoAlarmClusterLowBatteryEvent"); return nullptr; } - jmethodID lowBatteryStructCtor = env->GetMethodID(lowBatteryStructClass, "", "()V"); + jmethodID lowBatteryStructCtor = env->GetMethodID(lowBatteryStructClass, "", "(Ljava/lang/Integer;)V"); if (lowBatteryStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$SmokeCoAlarmClusterLowBatteryEvent constructor"); return nullptr; } - jobject value = env->NewObject(lowBatteryStructClass, lowBatteryStructCtor); + jobject value = env->NewObject(lowBatteryStructClass, lowBatteryStructCtor, value_alarmSeverityLevel); return value; } @@ -2787,6 +2808,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_alarmSeverityLevel; + std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; + std::string value_alarmSeverityLevelCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), + static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jclass interconnectSmokeAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$SmokeCoAlarmClusterInterconnectSmokeAlarmEvent", @@ -2796,14 +2824,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & ChipLogError(Zcl, "Could not find class ChipEventStructs$SmokeCoAlarmClusterInterconnectSmokeAlarmEvent"); return nullptr; } - jmethodID interconnectSmokeAlarmStructCtor = env->GetMethodID(interconnectSmokeAlarmStructClass, "", "()V"); + jmethodID interconnectSmokeAlarmStructCtor = + env->GetMethodID(interconnectSmokeAlarmStructClass, "", "(Ljava/lang/Integer;)V"); if (interconnectSmokeAlarmStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$SmokeCoAlarmClusterInterconnectSmokeAlarmEvent constructor"); return nullptr; } - jobject value = env->NewObject(interconnectSmokeAlarmStructClass, interconnectSmokeAlarmStructCtor); + jobject value = + env->NewObject(interconnectSmokeAlarmStructClass, interconnectSmokeAlarmStructCtor, value_alarmSeverityLevel); return value; } @@ -2814,6 +2844,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_alarmSeverityLevel; + std::string value_alarmSeverityLevelClassName = "java/lang/Integer"; + std::string value_alarmSeverityLevelCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_alarmSeverityLevelClassName.c_str(), value_alarmSeverityLevelCtorSignature.c_str(), + static_cast(cppValue.alarmSeverityLevel), value_alarmSeverityLevel); + jclass interconnectCOAlarmStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$SmokeCoAlarmClusterInterconnectCOAlarmEvent", @@ -2823,14 +2860,15 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & ChipLogError(Zcl, "Could not find class ChipEventStructs$SmokeCoAlarmClusterInterconnectCOAlarmEvent"); return nullptr; } - jmethodID interconnectCOAlarmStructCtor = env->GetMethodID(interconnectCOAlarmStructClass, "", "()V"); + jmethodID interconnectCOAlarmStructCtor = + env->GetMethodID(interconnectCOAlarmStructClass, "", "(Ljava/lang/Integer;)V"); if (interconnectCOAlarmStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$SmokeCoAlarmClusterInterconnectCOAlarmEvent constructor"); return nullptr; } - jobject value = env->NewObject(interconnectCOAlarmStructClass, interconnectCOAlarmStructCtor); + jobject value = env->NewObject(interconnectCOAlarmStructClass, interconnectCOAlarmStructCtor, value_alarmSeverityLevel); return value; } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 2faf941fc46051..b12d5d9f86e5c3 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -16904,6 +16904,18 @@ public void subscribeOperationalStateListAttribute( subscribeOperationalStateListAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readOperationalStateAttribute( + IntegerAttributeCallback callback + ) { + readOperationalStateAttribute(chipClusterPtr, callback); + } + public void subscribeOperationalStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOperationalStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback ) { @@ -17004,6 +17016,13 @@ private native void subscribeOperationalStateListAttribute(long chipClusterPtr, OperationalStateListAttributeCallback callback , int minInterval, int maxInterval); + private native void readOperationalStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOperationalStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback ); @@ -17208,6 +17227,18 @@ public void subscribeOperationalStateListAttribute( subscribeOperationalStateListAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readOperationalStateAttribute( + IntegerAttributeCallback callback + ) { + readOperationalStateAttribute(chipClusterPtr, callback); + } + public void subscribeOperationalStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOperationalStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback ) { @@ -17308,6 +17339,13 @@ private native void subscribeOperationalStateListAttribute(long chipClusterPtr, OperationalStateListAttributeCallback callback , int minInterval, int maxInterval); + private native void readOperationalStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOperationalStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback ); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java index c3dbcb84c12ca2..61eeb49bb048c2 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java @@ -1087,45 +1087,63 @@ public String toString() { } public static class SmokeCoAlarmClusterSmokeAlarmEvent { +public Integer alarmSeverityLevel; public SmokeCoAlarmClusterSmokeAlarmEvent( -) { + Integer alarmSeverityLevel + ) { + this.alarmSeverityLevel = alarmSeverityLevel; } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("SmokeCoAlarmClusterSmokeAlarmEvent {\n"); + output.append("\talarmSeverityLevel: "); + output.append(alarmSeverityLevel); + output.append("\n"); output.append("}\n"); return output.toString(); } } public static class SmokeCoAlarmClusterCOAlarmEvent { +public Integer alarmSeverityLevel; public SmokeCoAlarmClusterCOAlarmEvent( -) { + Integer alarmSeverityLevel + ) { + this.alarmSeverityLevel = alarmSeverityLevel; } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("SmokeCoAlarmClusterCOAlarmEvent {\n"); + output.append("\talarmSeverityLevel: "); + output.append(alarmSeverityLevel); + output.append("\n"); output.append("}\n"); return output.toString(); } } public static class SmokeCoAlarmClusterLowBatteryEvent { +public Integer alarmSeverityLevel; public SmokeCoAlarmClusterLowBatteryEvent( -) { + Integer alarmSeverityLevel + ) { + this.alarmSeverityLevel = alarmSeverityLevel; } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("SmokeCoAlarmClusterLowBatteryEvent {\n"); + output.append("\talarmSeverityLevel: "); + output.append(alarmSeverityLevel); + output.append("\n"); output.append("}\n"); return output.toString(); } @@ -1207,30 +1225,42 @@ public String toString() { } public static class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { +public Integer alarmSeverityLevel; public SmokeCoAlarmClusterInterconnectSmokeAlarmEvent( -) { + Integer alarmSeverityLevel + ) { + this.alarmSeverityLevel = alarmSeverityLevel; } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n"); + output.append("\talarmSeverityLevel: "); + output.append(alarmSeverityLevel); + output.append("\n"); output.append("}\n"); return output.toString(); } } public static class SmokeCoAlarmClusterInterconnectCOAlarmEvent { +public Integer alarmSeverityLevel; public SmokeCoAlarmClusterInterconnectCOAlarmEvent( -) { + Integer alarmSeverityLevel + ) { + this.alarmSeverityLevel = alarmSeverityLevel; } @Override public String toString() { StringBuilder output = new StringBuilder(); output.append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n"); + output.append("\talarmSeverityLevel: "); + output.append(alarmSeverityLevel); + output.append("\n"); output.append("}\n"); return output.toString(); } diff --git a/src/controller/python/ChipDeviceController-Discovery.cpp b/src/controller/python/ChipDeviceController-Discovery.cpp index 833ff84a4dff3a..eda6bf0b46308a 100644 --- a/src/controller/python/ChipDeviceController-Discovery.cpp +++ b/src/controller/python/ChipDeviceController-Discovery.cpp @@ -141,8 +141,7 @@ void pychip_DeviceController_IterateDiscoveredCommissionableNodes(Controller::De } if (dnsSdInfo->commissionData.rotatingIdLen > 0) { - jsonVal["rotatingId"] = std::string(reinterpret_cast(dnsSdInfo->commissionData.rotatingId), - dnsSdInfo->commissionData.rotatingIdLen); + jsonVal["rotatingId"] = rotatingId; } { diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index 39d4fa58647ce3..e69ad2d2850d39 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -139,7 +139,7 @@ PyChipError pychip_DeviceController_SetThreadOperationalDataset(const char * thr PyChipError pychip_DeviceController_SetWiFiCredentials(const char * ssid, const char * credentials); PyChipError pychip_DeviceController_CloseSession(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeid); PyChipError pychip_DeviceController_EstablishPASESessionIP(chip::Controller::DeviceCommissioner * devCtrl, const char * peerAddrStr, - uint32_t setupPINCode, chip::NodeId nodeid); + uint32_t setupPINCode, chip::NodeId nodeid, uint16_t port); PyChipError pychip_DeviceController_EstablishPASESessionBLE(chip::Controller::DeviceCommissioner * devCtrl, uint32_t setupPINCode, uint16_t discriminator, chip::NodeId nodeid); PyChipError pychip_DeviceController_Commission(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeid); @@ -512,13 +512,17 @@ PyChipError pychip_DeviceController_CloseSession(chip::Controller::DeviceCommiss } PyChipError pychip_DeviceController_EstablishPASESessionIP(chip::Controller::DeviceCommissioner * devCtrl, const char * peerAddrStr, - uint32_t setupPINCode, chip::NodeId nodeid) + uint32_t setupPINCode, chip::NodeId nodeid, uint16_t port) { chip::Inet::IPAddress peerAddr; chip::Transport::PeerAddress addr; RendezvousParameters params = chip::RendezvousParameters().SetSetupPINCode(setupPINCode); VerifyOrReturnError(chip::Inet::IPAddress::FromString(peerAddrStr, peerAddr), ToPyChipError(CHIP_ERROR_INVALID_ARGUMENT)); addr.SetTransportType(chip::Transport::Type::kUdp).SetIPAddress(peerAddr); + if (port != 0) + { + addr.SetPort(port); + } params.SetPeerAddress(addr).SetDiscriminator(0); sPairingDelegate.SetExpectingPairingComplete(true); return ToPyChipError(devCtrl->EstablishPASEConnection(nodeid, params)); diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 1022182a9d94cd..37437eac71886c 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -473,13 +473,13 @@ def EstablishPASESessionBLE(self, setupPinCode: int, discriminator: int, nodeid: self.devCtrl, setupPinCode, discriminator, nodeid) ) - def EstablishPASESessionIP(self, ipaddr: str, setupPinCode: int, nodeid: int): + def EstablishPASESessionIP(self, ipaddr: str, setupPinCode: int, nodeid: int, port: int = 0): self.CheckIsActive() self.state = DCState.RENDEZVOUS_ONGOING return self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_EstablishPASESessionIP( - self.devCtrl, ipaddr.encode("utf-8"), setupPinCode, nodeid) + self.devCtrl, ipaddr.encode("utf-8"), setupPinCode, nodeid, port) ) def GetTestCommissionerUsed(self): @@ -779,9 +779,30 @@ def ComputeRoundTripTimeout(self, nodeid, upperLayerProcessingTimeoutMs: int = 0 device.deviceProxy, upperLayerProcessingTimeoutMs)) return res + async def TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke(self, nodeid: int, endpoint: int, + payload: ClusterObjects.ClusterCommand, responseType=None): + ''' + + Please see SendCommand for description. + ''' + self.CheckIsActive() + + eventLoop = asyncio.get_running_loop() + future = eventLoop.create_future() + + device = self.GetConnectedDeviceSync(nodeid, timeoutMs=None) + ClusterCommand.TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke( + future, eventLoop, responseType, device.deviceProxy, ClusterCommand.CommandPath( + EndpointId=endpoint, + ClusterId=payload.cluster_id, + CommandId=payload.command_id, + ), payload).raise_on_error() + return await future + async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects.ClusterCommand, responseType=None, timedRequestTimeoutMs: typing.Union[None, int] = None, - interactionTimeoutMs: typing.Union[None, int] = None, busyWaitMs: typing.Union[None, int] = None): + interactionTimeoutMs: typing.Union[None, int] = None, busyWaitMs: typing.Union[None, int] = None, + suppressResponse: typing.Union[None, bool] = None): ''' Send a cluster-object encapsulated command to a node and get returned a future that can be awaited upon to receive the response. If a valid responseType is passed in, that will be used to deserialize the object. If not, @@ -803,7 +824,7 @@ async def SendCommand(self, nodeid: int, endpoint: int, payload: ClusterObjects. ClusterId=payload.cluster_id, CommandId=payload.command_id, ), payload, timedRequestTimeoutMs=timedRequestTimeoutMs, - interactionTimeoutMs=interactionTimeoutMs, busyWaitMs=busyWaitMs).raise_on_error() + interactionTimeoutMs=interactionTimeoutMs, busyWaitMs=busyWaitMs, suppressResponse=suppressResponse).raise_on_error() return await future def SendGroupCommand(self, groupid: int, payload: ClusterObjects.ClusterCommand, busyWaitMs: typing.Union[None, int] = None): @@ -1338,7 +1359,7 @@ def _InitLib(self): self._dmLib.pychip_DeviceController_DiscoverCommissionableNodesCommissioningEnabled.restype = PyChipError self._dmLib.pychip_DeviceController_EstablishPASESessionIP.argtypes = [ - c_void_p, c_char_p, c_uint32, c_uint64] + c_void_p, c_char_p, c_uint32, c_uint64, c_uint16] self._dmLib.pychip_DeviceController_EstablishPASESessionIP.restype = PyChipError self._dmLib.pychip_DeviceController_EstablishPASESessionBLE.argtypes = [ diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 56122c414e5143..8346243254abab 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -5280,7 +5280,7 @@ class ChipClusters: 0x00000004: { "attributeName": "OperationalState", "attributeId": 0x00000004, - "type": "", + "type": "int", "reportable": True, }, 0x00000005: { @@ -5384,7 +5384,7 @@ class ChipClusters: 0x00000004: { "attributeName": "OperationalState", "attributeId": 0x00000004, - "type": "", + "type": "int", "reportable": True, }, 0x00000005: { diff --git a/src/controller/python/chip/clusters/Command.py b/src/controller/python/chip/clusters/Command.py index 203c92aeb49744..af1336541b2e3e 100644 --- a/src/controller/python/chip/clusters/Command.py +++ b/src/controller/python/chip/clusters/Command.py @@ -21,7 +21,7 @@ import logging import sys from asyncio.futures import Future -from ctypes import CFUNCTYPE, c_char_p, c_size_t, c_uint8, c_uint16, c_uint32, c_void_p, py_object +from ctypes import CFUNCTYPE, c_bool, c_char_p, c_size_t, c_uint8, c_uint16, c_uint32, c_void_p, py_object from dataclasses import dataclass from typing import Type, Union @@ -144,8 +144,30 @@ def _OnCommandSenderDoneCallback(closure): ctypes.pythonapi.Py_DecRef(ctypes.py_object(closure)) +def TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke(future: Future, eventLoop, responseType, device, commandPath, payload): + ''' ONLY TO BE USED FOR TEST: Sends the payload with a TimedRequest flag but no TimedInvoke transaction + ''' + if (responseType is not None) and (not issubclass(responseType, ClusterCommand)): + raise ValueError("responseType must be a ClusterCommand or None") + + handle = chip.native.GetLibraryHandle() + transaction = AsyncCommandTransaction(future, eventLoop, responseType) + + payloadTLV = payload.ToTLV() + ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) + return builtins.chipStack.Call( + lambda: handle.pychip_CommandSender_TestOnlySendCommandTimedRequestNoTimedInvoke( + ctypes.py_object(transaction), device, + commandPath.EndpointId, commandPath.ClusterId, commandPath.CommandId, payloadTLV, len(payloadTLV), + ctypes.c_uint16(0), # interactionTimeoutMs + ctypes.c_uint16(0), # busyWaitMs + ctypes.c_bool(False) # suppressResponse + )) + + def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPath: CommandPath, payload: ClusterCommand, - timedRequestTimeoutMs: Union[None, int] = None, interactionTimeoutMs: Union[None, int] = None, busyWaitMs: Union[None, int] = None) -> PyChipError: + timedRequestTimeoutMs: Union[None, int] = None, interactionTimeoutMs: Union[None, int] = None, busyWaitMs: Union[None, int] = None, + suppressResponse: Union[None, bool] = None) -> PyChipError: ''' Send a cluster-object encapsulated command to a device and does the following: - On receipt of a successful data response, returns the cluster-object equivalent through the provided future. - None (on a successful response containing no data) @@ -175,6 +197,7 @@ def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPa commandPath.ClusterId, commandPath.CommandId, payloadTLV, len(payloadTLV), ctypes.c_uint16(0 if interactionTimeoutMs is None else interactionTimeoutMs), ctypes.c_uint16(0 if busyWaitMs is None else busyWaitMs), + ctypes.c_bool(False if suppressResponse is None else suppressResponse) )) @@ -203,7 +226,9 @@ def Init(): setter = chip.native.NativeLibraryHandleMethodArguments(handle) setter.Set('pychip_CommandSender_SendCommand', - PyChipError, [py_object, c_void_p, c_uint16, c_uint32, c_uint32, c_char_p, c_size_t, c_uint16]) + PyChipError, [py_object, c_void_p, c_uint16, c_uint32, c_uint32, c_char_p, c_size_t, c_uint16, c_bool]) + setter.Set('pychip_CommandSender_TestOnlySendCommandTimedRequestNoTimedInvoke', + PyChipError, [py_object, c_void_p, c_uint32, c_uint32, c_char_p, c_size_t, c_uint16, c_bool]) setter.Set('pychip_CommandSender_SendGroupCommand', PyChipError, [c_uint16, c_void_p, c_uint32, c_uint32, c_char_p, c_size_t, c_uint16]) setter.Set('pychip_CommandSender_InitCallbacks', None, [ diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 8413d9e417e252..aa2c6e474d06c9 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -17805,8 +17805,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) + alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + @dataclass class COAlarm(ClusterEvent): @ChipUtility.classproperty @@ -17821,8 +17824,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) + alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + @dataclass class LowBattery(ClusterEvent): @ChipUtility.classproperty @@ -17837,8 +17843,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) + alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + @dataclass class HardwareFault(ClusterEvent): @ChipUtility.classproperty @@ -17933,8 +17942,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) + alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + @dataclass class InterconnectCOAlarm(ClusterEvent): @ChipUtility.classproperty @@ -17949,8 +17961,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) + alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + @dataclass class AllClear(ClusterEvent): @ChipUtility.classproperty @@ -18241,7 +18256,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentPhase", Tag=0x00000001, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="countdownTime", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="operationalStateList", Tag=0x00000003, Type=typing.List[OperationalState.Structs.OperationalStateStruct]), - ClusterObjectFieldDescriptor(Label="operationalState", Tag=0x00000004, Type=OperationalState.Structs.OperationalStateStruct), + ClusterObjectFieldDescriptor(Label="operationalState", Tag=0x00000004, Type=OperationalState.Enums.OperationalStateEnum), ClusterObjectFieldDescriptor(Label="operationalError", Tag=0x00000005, Type=OperationalState.Structs.ErrorStateStruct), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), @@ -18255,7 +18270,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: currentPhase: 'typing.Union[Nullable, uint]' = None countdownTime: 'typing.Union[None, Nullable, uint]' = None operationalStateList: 'typing.List[OperationalState.Structs.OperationalStateStruct]' = None - operationalState: 'OperationalState.Structs.OperationalStateStruct' = None + operationalState: 'OperationalState.Enums.OperationalStateEnum' = None operationalError: 'OperationalState.Structs.ErrorStateStruct' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None @@ -18462,9 +18477,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=OperationalState.Structs.OperationalStateStruct) + return ClusterObjectFieldDescriptor(Type=OperationalState.Enums.OperationalStateEnum) - value: 'OperationalState.Structs.OperationalStateStruct' = field(default_factory=lambda: OperationalState.Structs.OperationalStateStruct()) + value: 'OperationalState.Enums.OperationalStateEnum' = 0 @dataclass class OperationalError(ClusterAttributeDescriptor): @@ -18634,7 +18649,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentPhase", Tag=0x00000001, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="countdownTime", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="operationalStateList", Tag=0x00000003, Type=typing.List[RvcOperationalState.Structs.OperationalStateStruct]), - ClusterObjectFieldDescriptor(Label="operationalState", Tag=0x00000004, Type=RvcOperationalState.Structs.OperationalStateStruct), + ClusterObjectFieldDescriptor(Label="operationalState", Tag=0x00000004, Type=uint), ClusterObjectFieldDescriptor(Label="operationalError", Tag=0x00000005, Type=RvcOperationalState.Structs.ErrorStateStruct), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), @@ -18648,7 +18663,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: currentPhase: 'typing.Union[Nullable, uint]' = None countdownTime: 'typing.Union[None, Nullable, uint]' = None operationalStateList: 'typing.List[RvcOperationalState.Structs.OperationalStateStruct]' = None - operationalState: 'RvcOperationalState.Structs.OperationalStateStruct' = None + operationalState: 'uint' = None operationalError: 'RvcOperationalState.Structs.ErrorStateStruct' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None @@ -18858,9 +18873,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=RvcOperationalState.Structs.OperationalStateStruct) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'RvcOperationalState.Structs.OperationalStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.OperationalStateStruct()) + value: 'uint' = 0 @dataclass class OperationalError(ClusterAttributeDescriptor): diff --git a/src/controller/python/chip/clusters/command.cpp b/src/controller/python/chip/clusters/command.cpp index 468bff52d5f13d..c824c251995932 100644 --- a/src/controller/python/chip/clusters/command.cpp +++ b/src/controller/python/chip/clusters/command.cpp @@ -36,7 +36,11 @@ extern "C" { PyChipError pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, uint16_t timedRequestTimeoutMs, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, const uint8_t * payload, size_t length, uint16_t interactionTimeoutMs, - uint16_t busyWaitMs); + uint16_t busyWaitMs, bool suppressResponse); + +PyChipError pychip_CommandSender_TestOnlySendCommandTimedRequestNoTimedInvoke( + void * appContext, DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, + const uint8_t * payload, size_t length, uint16_t interactionTimeoutMs, uint16_t busyWaitMs, bool suppressResponse); PyChipError pychip_CommandSender_SendGroupCommand(chip::GroupId groupId, chip::Controller::DeviceCommissioner * devCtrl, chip::ClusterId clusterId, chip::CommandId commandId, const uint8_t * payload, @@ -132,15 +136,16 @@ void pychip_CommandSender_InitCallbacks(OnCommandSenderResponseCallback onComman PyChipError pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, uint16_t timedRequestTimeoutMs, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, const uint8_t * payload, size_t length, uint16_t interactionTimeoutMs, - uint16_t busyWaitMs) + uint16_t busyWaitMs, bool suppressResponse) { CHIP_ERROR err = CHIP_NO_ERROR; VerifyOrReturnError(device->GetSecureSession().HasValue(), ToPyChipError(CHIP_ERROR_MISSING_SECURE_SESSION)); std::unique_ptr callback = std::make_unique(appContext); - std::unique_ptr sender = std::make_unique(callback.get(), device->GetExchangeManager(), - /* is timed request */ timedRequestTimeoutMs != 0); + std::unique_ptr sender = + std::make_unique(callback.get(), device->GetExchangeManager(), + /* is timed request */ timedRequestTimeoutMs != 0, suppressResponse); app::CommandPathParams cmdParams = { endpointId, /* group id */ 0, clusterId, commandId, (app::CommandPathFlags::kEndpointIdValid) }; @@ -176,6 +181,56 @@ PyChipError pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * de return ToPyChipError(err); } +PyChipError pychip_CommandSender_TestOnlySendCommandTimedRequestNoTimedInvoke( + void * appContext, DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::CommandId commandId, + const uint8_t * payload, size_t length, uint16_t interactionTimeoutMs, uint16_t busyWaitMs, bool suppressResponse) +{ +#if CONFIG_BUILD_FOR_HOST_UNIT_TEST + + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrReturnError(device->GetSecureSession().HasValue(), ToPyChipError(CHIP_ERROR_MISSING_SECURE_SESSION)); + + std::unique_ptr callback = std::make_unique(appContext); + std::unique_ptr sender = std::make_unique(callback.get(), device->GetExchangeManager(), + /* is timed request */ true, suppressResponse); + + app::CommandPathParams cmdParams = { endpointId, /* group id */ 0, clusterId, commandId, + (app::CommandPathFlags::kEndpointIdValid) }; + + SuccessOrExit(err = sender->PrepareCommand(cmdParams, false)); + + { + auto writer = sender->GetCommandDataIBTLVWriter(); + TLV::TLVReader reader; + VerifyOrExit(writer != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + reader.Init(payload, length); + reader.Next(); + SuccessOrExit(err = writer->CopyContainer(TLV::ContextTag(CommandDataIB::Tag::kFields), reader)); + } + + SuccessOrExit(err = sender->FinishCommand(false)); + + SuccessOrExit(err = sender->TestOnlyCommandSenderTimedRequestFlagWithNoTimedInvoke( + device->GetSecureSession().Value(), + interactionTimeoutMs != 0 ? MakeOptional(System::Clock::Milliseconds32(interactionTimeoutMs)) + : Optional::Missing())); + + sender.release(); + callback.release(); + + if (busyWaitMs) + { + usleep(busyWaitMs * 1000); + } + +exit: + return ToPyChipError(err); +#else + return ToPyChipError(CHIP_ERROR_NOT_IMPLEMENTED); +#endif +} + PyChipError pychip_CommandSender_SendGroupCommand(chip::GroupId groupId, chip::Controller::DeviceCommissioner * devCtrl, chip::ClusterId clusterId, chip::CommandId commandId, const uint8_t * payload, size_t length, uint16_t busyWaitMs) diff --git a/src/controller/python/chip/setup_payload/setup_payload.py b/src/controller/python/chip/setup_payload/setup_payload.py index c6a6b6a690e423..1f70983ad9a7ff 100644 --- a/src/controller/python/chip/setup_payload/setup_payload.py +++ b/src/controller/python/chip/setup_payload/setup_payload.py @@ -122,6 +122,10 @@ def __InitNativeFunctions(self, chipLib): # Getters from parsed contents. # Prefer using the methods below to access setup payload information once parse. + @property + def version(self) -> int: + return int(self.attributes.get("Version", "0")) + @property def vendor_id(self) -> int: return int(self.attributes.get("VendorID", "0")) diff --git a/src/controller/python/chip/utils/CommissioningBuildingBlocks.py b/src/controller/python/chip/utils/CommissioningBuildingBlocks.py index bfff0ef0545fc2..efa104258a0e25 100644 --- a/src/controller/python/chip/utils/CommissioningBuildingBlocks.py +++ b/src/controller/python/chip/utils/CommissioningBuildingBlocks.py @@ -177,7 +177,8 @@ async def AddNOCForNewFabricFromExisting(commissionerDevCtrl, newFabricDevCtrl, opCreds.Commands.AddNOC(chainForAddNOC.nocBytes, chainForAddNOC.icacBytes, chainForAddNOC.ipkBytes, - newFabricDevCtrl.nodeId, 0xFFF1)) + newFabricDevCtrl.nodeId, + newFabricDevCtrl.fabricAdmin.vendorId)) if resp.statusCode is not opCreds.Enums.NodeOperationalCertStatusEnum.kOk: # Expiring the failsafe timer in an attempt to clean up. await commissionerDevCtrl.SendCommand(existingNodeId, 0, generalCommissioning.Commands.ArmFailSafe(0)) diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 4bf94757e835e0..5c59c6c1501488 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -302,7 +302,7 @@ class TestReadInteraction : public app::ReadHandler::ApplicationCallback if (mAlterSubscriptionIntervals) { - ReturnErrorOnFailure(aReadHandler.SetReportingIntervals(mMaxInterval)); + ReturnErrorOnFailure(aReadHandler.SetMaxReportingInterval(mMaxInterval)); } return CHIP_NO_ERROR; } diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt index 0bd5dad2895bf9..8c9372f87bc9ff 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc-src.zapt @@ -63,8 +63,18 @@ NS_ASSUME_NONNULL_BEGIN {{! Takes the name of the struct to use as structName. }} {{#*inline "oldNameImpl"}} -{{#if (isSupported (compatClusterNameRemapping parent.name) struct=structName)}} -@implementation MTR{{compatClusterNameRemapping parent.name}}Cluster{{structName}} : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} +{{#if (isSupported cluster struct=structName)}} +@implementation MTR{{cluster}}Cluster{{structName}} : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} +{{#zcl_struct_items}} +{{#if (isSupported ../cluster struct=../structName structField=(asStructPropertyName label))}} +@dynamic {{asStructPropertyName label}}; +{{/if}} +{{#if (hasOldName ../cluster struct=../structName structField=(asStructPropertyName label))}} +{{#if (isSupported ../cluster struct=../structName structField=(oldName ../cluster struct=../structName structField=(asStructPropertyName label)))}} +@dynamic {{oldName ../cluster struct=../structName structField=(asStructPropertyName label)}}; +{{/if}} +{{/if}} +{{/zcl_struct_items}} @end {{/if}} {{/inline}} @@ -73,9 +83,9 @@ NS_ASSUME_NONNULL_BEGIN {{#if (or oldStructName (hasOldName (asUpperCamelCase parent.name preserveAcronyms=true)))}} {{#if oldStructName}} -{{> oldNameImpl structName=oldStructName}} +{{> oldNameImpl cluster=(compatClusterNameRemapping parent.name) structName=oldStructName}} {{else}} -{{> oldNameImpl structName=(asUpperCamelCase name preserveAcronyms=true)}} +{{> oldNameImpl cluster=(compatClusterNameRemapping parent.name) structName=(asUpperCamelCase name preserveAcronyms=true)}} {{/if}} {{/if}} {{/inline}} @@ -136,9 +146,19 @@ NS_ASSUME_NONNULL_BEGIN {{/if}} {{! Takes the name of the event to use as eventName. }} {{#*inline "oldNameImpl"}} -{{#if (isSupported (compatClusterNameRemapping parent.name) event=eventName)}} +{{#if (isSupported cluster event=eventName)}} -@implementation MTR{{compatClusterNameRemapping parent.name}}Cluster{{eventName}}Event : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event +@implementation MTR{{cluster}}Cluster{{eventName}}Event : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event +{{#zcl_event_fields}} +{{#if (isSupported ../cluster event=../eventName eventField=(asStructPropertyName name))}} +@dynamic {{asStructPropertyName name}}; +{{/if}} +{{#if (hasOldName ../cluster event=../eventName eventField=(asStructPropertyName name))}} +{{#if (isSupported ../cluster event=../eventName eventField=(oldName ../cluster event=../eventName eventField=(asStructPropertyName name)))}} +@dynamic {{oldName ../cluster event=../event eventField=(asStructPropertyName name)}}; +{{/if}} +{{/if}} +{{/zcl_event_fields}} @end {{/if}} {{/inline}} @@ -147,9 +167,9 @@ NS_ASSUME_NONNULL_BEGIN {{#if (or oldEventName (hasOldName (asUpperCamelCase parent.name preserveAcronyms=true)))}} {{#if oldEventName}} -{{> oldNameImpl eventName=oldEventName}} +{{> oldNameImpl cluster=(compatClusterNameRemapping parent.name) eventName=oldEventName}} {{else}} -{{> oldNameImpl eventName=(asUpperCamelCase name preserveAcronyms=true)}} +{{> oldNameImpl cluster=(compatClusterNameRemapping parent.name) eventName=(asUpperCamelCase name preserveAcronyms=true)}} {{/if}} {{/if}} {{/inline}} diff --git a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt index 868d8c130f067d..5e8c2528007182 100644 --- a/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRStructsObjc.zapt @@ -8,12 +8,12 @@ NS_ASSUME_NONNULL_BEGIN {{#zcl_structs}} {{#*inline "interfaceDecl"}} {{#zcl_struct_items}} -{{#if (isSupported (asUpperCamelCase ../../name preserveAcronyms=true) struct=../struct structField=(asStructPropertyName label))}} -{{> struct_field_decl cluster=parent.parent.name type=type label=label}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) struct=../struct structField=(asStructPropertyName label) deprecationMessage=(concat "Please use MTR" (asUpperCamelCase ../../name preserveAcronyms=true) "Cluster" (asUpperCamelCase ../name preserveAcronyms=true))}}; +{{#if (isSupported ../cluster struct=../struct structField=(asStructPropertyName label))}} +{{> struct_field_decl cluster=../cluster type=type label=label}} {{availability (asUpperCamelCase ../cluster preserveAcronyms=true) struct=../struct structField=(asStructPropertyName label) deprecationMessage=(concat "Please use MTR" (asUpperCamelCase ../../name preserveAcronyms=true) "Cluster" (asUpperCamelCase ../name preserveAcronyms=true))}}; {{/if}} -{{#if (hasOldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName label))}} -{{#if (isSupported (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(oldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName label)))}} -{{> struct_field_decl cluster=../../name type=type label=(oldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName label))}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(oldName (asUpperCamelCase ../../name preserveAcronyms=true) struct=(asUpperCamelCase ../name preserveAcronyms=true) structField=(asStructPropertyName label)) deprecationMessage=(concat "Please use " (asStructPropertyName label))}}; +{{#if (hasOldName ../cluster struct=../struct structField=(asStructPropertyName label))}} +{{#if (isSupported ../cluster struct=../struct structField=(oldName ../cluster struct=../struct structField=(asStructPropertyName label)))}} +{{> struct_field_decl cluster=../cluster type=type label=(oldName ../cluster struct=../struct structField=(asStructPropertyName label))}} {{availability ../cluster struct=../struct structField=(oldName ../cluster struct=../struct structField=(asStructPropertyName label)) deprecationMessage=(concat "Please use " (asStructPropertyName label))}}; {{/if}} {{/if}} {{/zcl_struct_items}} @@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN {{#if (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) struct=(asUpperCamelCase name preserveAcronyms=true))}} {{availability (asUpperCamelCase parent.name preserveAcronyms=true) struct=(asUpperCamelCase name preserveAcronyms=true) deprecationMessage="This struct is unused and will be removed"}} @interface MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} : NSObject -{{> interfaceDecl struct=(asUpperCamelCase name preserveAcronyms=true)}} +{{> interfaceDecl cluster=(asUpperCamelCase parent.name preserveAcronyms=true) struct=(asUpperCamelCase name preserveAcronyms=true)}} @end {{/if}} @@ -30,7 +30,9 @@ NS_ASSUME_NONNULL_BEGIN {{#if (isSupported (compatClusterNameRemapping parent.name) struct=structName)}} {{availability (compatClusterNameRemapping parent.name) struct=structName deprecationMessage=(concat "Please use MTR" (asUpperCamelCase parent.name preserveAcronyms=true) "Cluster" (asUpperCamelCase name preserveAcronyms=true))}} @interface MTR{{compatClusterNameRemapping parent.name}}Cluster{{structName}} : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}} +{{> interfaceDecl cluster=(compatClusterNameRemapping parent.name) struct=structName}} @end + {{/if}} {{/inline}} {{! Takes the old name of the struct, if any, as oldStructName. }} @@ -48,28 +50,33 @@ NS_ASSUME_NONNULL_BEGIN {{/zcl_structs}} {{#zcl_events}} -{{#if (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true))}} -{{availability (asUpperCamelCase parent.name preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true)}} -@interface MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event : NSObject +{{#*inline "interfaceDecl"}} {{#zcl_event_fields}} -{{#if (isSupported (asUpperCamelCase ../../name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name))}} -{{> struct_field_decl cluster=parent.parent.name type=type label=name}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name)}}; +{{#if (isSupported ../cluster event=../event eventField=(asStructPropertyName name))}} +{{> struct_field_decl cluster=../cluster type=type label=name}} {{availability ../cluster event=../event eventField=(asStructPropertyName name) deprecationMessage=(concat "Please use MTR" (asUpperCamelCase ../../name preserveAcronyms=true) "Cluster" (asUpperCamelCase ../name preserveAcronyms=true) "Event")}}; {{/if}} -{{#if (hasOldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name))}} -{{#if (isSupported (asUpperCamelCase ../../name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(oldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name)))}} -{{> struct_field_decl cluster=parent.parent.name type=type label=(oldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name))}} {{availability (asUpperCamelCase ../../name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(oldName (asUpperCamelCase ../parent.name preserveAcronyms=true) event=(asUpperCamelCase ../name preserveAcronyms=true) eventField=(asStructPropertyName name)) deprecationMessage=(concat "Please use " (asStructPropertyName name))}}; +{{#if (hasOldName ../cluster event=../event eventField=(asStructPropertyName name))}} +{{#if (isSupported ../cluster event=../event eventField=(oldName ../cluster event=../event eventField=(asStructPropertyName name)))}} +{{> struct_field_decl cluster=../cluster type=type label=(oldName ../cluster event=../event eventField=(asStructPropertyName name))}} {{availability ../cluster event=../event eventField=(oldName ../cluster event=../event eventField=(asStructPropertyName name)) deprecationMessage=(concat "Please use " (asStructPropertyName name))}}; {{/if}} {{/if}} {{/zcl_event_fields}} +{{/inline}} +{{#if (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true))}} +{{availability (asUpperCamelCase parent.name preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true)}} +@interface MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event : NSObject +{{> interfaceDecl cluster=(asUpperCamelCase parent.name preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true)}} @end + {{/if}} {{! Takes the name of the event to use as eventName. }} {{#*inline "oldNameDecl"}} {{#if (isSupported (compatClusterNameRemapping parent.name) event=eventName)}} - {{availability (compatClusterNameRemapping parent.name) event=eventName deprecationMessage=(concat "Please use MTR" (asUpperCamelCase parent.name preserveAcronyms=true) "Cluster" (asUpperCamelCase name preserveAcronyms=true) "Event")}} @interface MTR{{compatClusterNameRemapping parent.name}}Cluster{{eventName}}Event : MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Event +{{> interfaceDecl cluster=(compatClusterNameRemapping parent.name) event=eventName}} @end + {{/if}} {{/inline}} {{! Takes the old name of the event, if any, as oldEventName. }} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 14eb2b6fb8a838..7358a620955d52 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -46,6 +46,8 @@ API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) MTR_DEPRECATED( "Please use MTRDescriptorClusterDeviceTypeStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRDescriptorClusterDeviceType : MTRDescriptorClusterDeviceTypeStruct +@property (nonatomic, copy) NSNumber * _Nonnull revision MTR_DEPRECATED( + "Please use MTRDescriptorClusterDeviceTypeStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -67,7 +69,17 @@ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlTargetStruct", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRAccessControlClusterTarget : MTRAccessControlClusterAccessControlTargetStruct +@property (nonatomic, copy) + NSNumber * _Nullable cluster MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlTargetStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nullable endpoint MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlTargetStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nullable deviceType MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlTargetStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRAccessControlClusterAccessControlEntryStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull privilege API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -80,7 +92,22 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlEntryStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRAccessControlClusterAccessControlEntry : MTRAccessControlClusterAccessControlEntryStruct +@property (nonatomic, copy) + NSNumber * _Nonnull privilege MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlEntryStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull authMode MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlEntryStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSArray * _Nullable subjects MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlEntryStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nullable targets MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlEntryStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull fabricIndex MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlEntryStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRAccessControlClusterAccessControlExtensionStruct : NSObject @property (nonatomic, copy) NSData * _Nonnull data API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -90,6 +117,11 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlExtensionStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRAccessControlClusterExtensionEntry : MTRAccessControlClusterAccessControlExtensionStruct +@property (nonatomic, copy) NSData * _Nonnull data MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlExtensionStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull fabricIndex MTR_DEPRECATED("Please use MTRAccessControlClusterAccessControlExtensionStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -158,7 +190,14 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRBasicInformationClusterCapabilityMinimaStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRBasicClusterCapabilityMinimaStruct : MTRBasicInformationClusterCapabilityMinimaStruct +@property (nonatomic, copy) + NSNumber * _Nonnull caseSessionsPerFabric MTR_DEPRECATED("Please use MTRBasicInformationClusterCapabilityMinimaStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull subscriptionsPerFabric MTR_DEPRECATED("Please use MTRBasicInformationClusterCapabilityMinimaStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRBasicInformationClusterProductAppearanceStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull finish API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @@ -173,6 +212,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRBasicInformationClusterStartUpEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRBasicClusterStartUpEvent : MTRBasicInformationClusterStartUpEvent +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_DEPRECATED( + "Please use MTRBasicInformationClusterStartUpEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -192,6 +233,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRBasicInformationClusterLeaveEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRBasicClusterLeaveEvent : MTRBasicInformationClusterLeaveEvent +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_DEPRECATED( + "Please use MTRBasicInformationClusterLeaveEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -202,6 +245,9 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRBasicInformationClusterReachableChangedEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRBasicClusterReachableChangedEvent : MTRBasicInformationClusterReachableChangedEvent +@property (nonatomic, copy) + NSNumber * _Nonnull reachableNewValue MTR_DEPRECATED("Please use MTRBasicInformationClusterReachableChangedEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -214,6 +260,15 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterProviderLocation", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTROtaSoftwareUpdateRequestorClusterProviderLocation : MTROTASoftwareUpdateRequestorClusterProviderLocation +@property (nonatomic, copy) + NSNumber * _Nonnull providerNodeID MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterProviderLocation", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull endpoint MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterProviderLocation", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull fabricIndex MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterProviderLocation", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -229,6 +284,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterStateTransitionEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent : MTROTASoftwareUpdateRequestorClusterStateTransitionEvent +@property (nonatomic, copy) + NSNumber * _Nonnull previousState MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterStateTransitionEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, getter=getNewState) + NSNumber * _Nonnull newState MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterStateTransitionEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull reason MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterStateTransitionEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable targetSoftwareVersion MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterStateTransitionEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -240,6 +307,12 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent : MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent +@property (nonatomic, copy) + NSNumber * _Nonnull softwareVersion MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull productID MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -253,6 +326,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent : MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent +@property (nonatomic, copy) + NSNumber * _Nonnull softwareVersion MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull bytesDownloaded MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable progressPercent MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable platformCode MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end MTR_DEPRECATED("This struct is unused and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -314,7 +399,13 @@ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterNetworkInfoStruct", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRNetworkCommissioningClusterNetworkInfo : MTRNetworkCommissioningClusterNetworkInfoStruct +@property (nonatomic, copy) NSData * _Nonnull networkID MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterNetworkInfoStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull connected MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterNetworkInfoStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull panId API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @@ -330,7 +421,32 @@ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRNetworkCommissioningClusterThreadInterfaceScanResult : MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct +@property (nonatomic, copy) + NSNumber * _Nonnull panId MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull extendedPanId MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSString * _Nonnull networkName MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull channel MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull version MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSData * _Nonnull extendedAddress MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull rssi MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull lqi MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end + API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull security API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @@ -344,6 +460,24 @@ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRNetworkCommissioningClusterWiFiInterfaceScanResult : MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct +@property (nonatomic, copy) + NSNumber * _Nonnull security MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSData * _Nonnull ssid MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSData * _Nonnull bssid MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull channel MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull wiFiBand MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull rssi MTR_DEPRECATED("Please use MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -363,6 +497,28 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRGeneralDiagnosticsClusterNetworkInterfaceType : MTRGeneralDiagnosticsClusterNetworkInterface +@property (nonatomic, copy) NSString * _Nonnull name MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull isOperational MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable offPremiseServicesReachableIPv4 MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable offPremiseServicesReachableIPv6 MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSData * _Nonnull hardwareAddress MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSArray * _Nonnull iPv4Addresses MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSArray * _Nonnull iPv6Addresses MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull type MTR_DEPRECATED("Please use MTRGeneralDiagnosticsClusterNetworkInterface", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -400,6 +556,19 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRSoftwareDiagnosticsClusterThreadMetricsStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRSoftwareDiagnosticsClusterThreadMetrics : MTRSoftwareDiagnosticsClusterThreadMetricsStruct +@property (nonatomic, copy) NSNumber * _Nonnull id MTR_DEPRECATED("Please use MTRSoftwareDiagnosticsClusterThreadMetricsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nullable name MTR_DEPRECATED("Please use MTRSoftwareDiagnosticsClusterThreadMetricsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable stackFreeCurrent MTR_DEPRECATED("Please use MTRSoftwareDiagnosticsClusterThreadMetricsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable stackFreeMinimum MTR_DEPRECATED("Please use MTRSoftwareDiagnosticsClusterThreadMetricsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable stackSize MTR_DEPRECATED("Please use MTRSoftwareDiagnosticsClusterThreadMetricsStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -430,7 +599,50 @@ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRThreadNetworkDiagnosticsClusterNeighborTable : MTRThreadNetworkDiagnosticsClusterNeighborTableStruct +@property (nonatomic, copy) + NSNumber * _Nonnull extAddress MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull age MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull rloc16 MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull linkFrameCounter MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull mleFrameCounter MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull lqi MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nullable averageRssi MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nullable lastRssi MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull frameErrorRate MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull messageErrorRate MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull rxOnWhenIdle MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull fullThreadDevice MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull fullNetworkData MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull isChild MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterNeighborTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents : NSObject @property (nonatomic, copy) @@ -469,7 +681,37 @@ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRThreadNetworkDiagnosticsClusterRouteTable : MTRThreadNetworkDiagnosticsClusterRouteTableStruct +@property (nonatomic, copy) + NSNumber * _Nonnull extAddress MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull rloc16 MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull routerId MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull nextHop MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull pathCost MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull lqiIn MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull lqiOut MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) NSNumber * _Nonnull age MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull allocated MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", ios(16.1, 17.0), + macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +@property (nonatomic, copy) + NSNumber * _Nonnull linkEstablished MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsClusterRouteTableStruct", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRThreadNetworkDiagnosticsClusterSecurityPolicy : NSObject @property (nonatomic, copy) NSNumber * _Nonnull rotationTime API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -513,7 +755,16 @@ API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterDSTOffsetStruct", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) @interface MTRTimeSynchronizationClusterDstOffsetType : MTRTimeSynchronizationClusterDSTOffsetStruct +@property (nonatomic, copy) NSNumber * _Nonnull offset MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterDSTOffsetStruct", + ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +@property (nonatomic, copy) + NSNumber * _Nonnull validStarting MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterDSTOffsetStruct", ios(16.1, 16.5), + macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +@property (nonatomic, copy) + NSNumber * _Nullable validUntil MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterDSTOffsetStruct", ios(16.1, 16.5), + macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); @end + API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) @interface MTRTimeSynchronizationClusterTimeZoneStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull offset API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); @@ -524,6 +775,12 @@ API_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterTimeZoneStruct", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) @interface MTRTimeSynchronizationClusterTimeZoneType : MTRTimeSynchronizationClusterTimeZoneStruct +@property (nonatomic, copy) NSNumber * _Nonnull offset MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterTimeZoneStruct", + ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +@property (nonatomic, copy) NSNumber * _Nonnull validAt MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterTimeZoneStruct", + ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +@property (nonatomic, copy) NSString * _Nullable name MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterTimeZoneStruct", + ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); @end API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @@ -540,6 +797,9 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterStartUpEvent", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRBridgedDeviceBasicClusterStartUpEvent : MTRBridgedDeviceBasicInformationClusterStartUpEvent +@property (nonatomic, copy) + NSNumber * _Nonnull softwareVersion MTR_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterStartUpEvent", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -568,6 +828,9 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterReachableChangedEvent", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) @interface MTRBridgedDeviceBasicClusterReachableChangedEvent : MTRBridgedDeviceBasicInformationClusterReachableChangedEvent +@property (nonatomic, copy) + NSNumber * _Nonnull reachableNewValue MTR_DEPRECATED("Please use MTRBridgedDeviceBasicInformationClusterReachableChangedEvent", + ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -634,7 +897,17 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTROperationalCredentialsClusterFabricDescriptorStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTROperationalCredentialsClusterFabricDescriptor : MTROperationalCredentialsClusterFabricDescriptorStruct +@property (nonatomic, copy) + NSData * _Nonnull rootPublicKey MTR_DEPRECATED("Please use MTROperationalCredentialsClusterFabricDescriptorStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSString * _Nonnull label MTR_DEPRECATED("Please use MTROperationalCredentialsClusterFabricDescriptorStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nonnull fabricIndex MTR_DEPRECATED("Please use MTROperationalCredentialsClusterFabricDescriptorStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTROperationalCredentialsClusterNOCStruct : NSObject @property (nonatomic, copy) NSData * _Nonnull noc API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -696,7 +969,12 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRModeSelectClusterSemanticTagStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRModeSelectClusterSemanticTag : MTRModeSelectClusterSemanticTagStruct +@property (nonatomic, copy) NSNumber * _Nonnull mfgCode MTR_DEPRECATED( + "Please use MTRModeSelectClusterSemanticTagStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_DEPRECATED( + "Please use MTRModeSelectClusterSemanticTagStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRModeSelectClusterModeOptionStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull label API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -713,6 +991,10 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRDoorLockClusterCredentialStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRDoorLockClusterDlCredential : MTRDoorLockClusterCredentialStruct +@property (nonatomic, copy) NSNumber * _Nonnull credentialType MTR_DEPRECATED( + "Please use MTRDoorLockClusterCredentialStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull credentialIndex MTR_DEPRECATED( + "Please use MTRDoorLockClusterCredentialStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @@ -844,7 +1126,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRChannelClusterChannelInfo : MTRChannelClusterChannelInfoStruct +@property (nonatomic, copy) NSNumber * _Nonnull majorNumber MTR_DEPRECATED( + "Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull minorNumber MTR_DEPRECATED( + "Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nullable name MTR_DEPRECATED( + "Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nullable callSign MTR_DEPRECATED( + "Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nullable affiliateCallSign MTR_DEPRECATED( + "Please use MTRChannelClusterChannelInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRChannelClusterLineupInfoStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull operatorName API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -856,6 +1149,14 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRChannelClusterLineupInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRChannelClusterLineupInfo : MTRChannelClusterLineupInfoStruct +@property (nonatomic, copy) NSString * _Nonnull operatorName MTR_DEPRECATED( + "Please use MTRChannelClusterLineupInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nullable lineupName MTR_DEPRECATED( + "Please use MTRChannelClusterLineupInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nullable postalCode MTR_DEPRECATED( + "Please use MTRChannelClusterLineupInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull lineupInfoType MTR_DEPRECATED( + "Please use MTRChannelClusterLineupInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -867,6 +1168,10 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRTargetNavigatorClusterTargetInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTargetNavigatorClusterTargetInfo : MTRTargetNavigatorClusterTargetInfoStruct +@property (nonatomic, copy) NSNumber * _Nonnull identifier MTR_DEPRECATED("Please use MTRTargetNavigatorClusterTargetInfoStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nonnull name MTR_DEPRECATED("Please use MTRTargetNavigatorClusterTargetInfoStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -878,6 +1183,10 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRMediaPlaybackClusterPlaybackPositionStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRMediaPlaybackClusterPlaybackPosition : MTRMediaPlaybackClusterPlaybackPositionStruct +@property (nonatomic, copy) NSNumber * _Nonnull updatedAt MTR_DEPRECATED("Please use MTRMediaPlaybackClusterPlaybackPositionStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nullable position MTR_DEPRECATED("Please use MTRMediaPlaybackClusterPlaybackPositionStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -891,6 +1200,14 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRMediaInputClusterInputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRMediaInputClusterInputInfo : MTRMediaInputClusterInputInfoStruct +@property (nonatomic, copy) NSNumber * _Nonnull index MTR_DEPRECATED( + "Please use MTRMediaInputClusterInputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull inputType MTR_DEPRECATED( + "Please use MTRMediaInputClusterInputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nonnull name MTR_DEPRECATED( + "Please use MTRMediaInputClusterInputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nonnull descriptionString MTR_DEPRECATED( + "Please use MTRMediaInputClusterInputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -903,7 +1220,14 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRContentLauncherClusterDimensionStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRContentLauncherClusterDimension : MTRContentLauncherClusterDimensionStruct +@property (nonatomic, copy) NSNumber * _Nonnull width MTR_DEPRECATED( + "Please use MTRContentLauncherClusterDimensionStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull height MTR_DEPRECATED( + "Please use MTRContentLauncherClusterDimensionStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull metric MTR_DEPRECATED( + "Please use MTRContentLauncherClusterDimensionStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRContentLauncherClusterAdditionalInfoStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull name API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -913,7 +1237,12 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRContentLauncherClusterAdditionalInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRContentLauncherClusterAdditionalInfo : MTRContentLauncherClusterAdditionalInfoStruct +@property (nonatomic, copy) NSString * _Nonnull name MTR_DEPRECATED("Please use MTRContentLauncherClusterAdditionalInfoStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nonnull value MTR_DEPRECATED("Please use MTRContentLauncherClusterAdditionalInfoStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRContentLauncherClusterParameterStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull type API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -924,7 +1253,14 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRContentLauncherClusterParameterStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRContentLauncherClusterParameter : MTRContentLauncherClusterParameterStruct +@property (nonatomic, copy) NSNumber * _Nonnull type MTR_DEPRECATED( + "Please use MTRContentLauncherClusterParameterStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nonnull value MTR_DEPRECATED( + "Please use MTRContentLauncherClusterParameterStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nullable externalIDList MTR_DEPRECATED( + "Please use MTRContentLauncherClusterParameterStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRContentLauncherClusterContentSearchStruct : NSObject @property (nonatomic, copy) NSArray * _Nonnull parameterList API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -933,7 +1269,11 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRContentLauncherClusterContentSearchStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRContentLauncherClusterContentSearch : MTRContentLauncherClusterContentSearchStruct +@property (nonatomic, copy) + NSArray * _Nonnull parameterList MTR_DEPRECATED("Please use MTRContentLauncherClusterContentSearchStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRContentLauncherClusterStyleInformationStruct : NSObject @property (nonatomic, copy) NSString * _Nullable imageURL API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -947,7 +1287,13 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRContentLauncherClusterStyleInformationStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRContentLauncherClusterStyleInformation : MTRContentLauncherClusterStyleInformationStruct +@property (nonatomic, copy) NSString * _Nullable color MTR_DEPRECATED("Please use MTRContentLauncherClusterStyleInformationStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRContentLauncherClusterDimensionStruct * _Nullable size MTR_DEPRECATED( + "Please use MTRContentLauncherClusterStyleInformationStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRContentLauncherClusterBrandingInformationStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull providerName API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -966,6 +1312,24 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRContentLauncherClusterBrandingInformationStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRContentLauncherClusterBrandingInformation : MTRContentLauncherClusterBrandingInformationStruct +@property (nonatomic, copy) + NSString * _Nonnull providerName MTR_DEPRECATED("Please use MTRContentLauncherClusterBrandingInformationStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformationStruct * _Nullable background MTR_DEPRECATED( + "Please use MTRContentLauncherClusterBrandingInformationStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformationStruct * _Nullable logo MTR_DEPRECATED( + "Please use MTRContentLauncherClusterBrandingInformationStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformationStruct * _Nullable progressBar MTR_DEPRECATED( + "Please use MTRContentLauncherClusterBrandingInformationStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformationStruct * _Nullable splash MTR_DEPRECATED( + "Please use MTRContentLauncherClusterBrandingInformationStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRContentLauncherClusterStyleInformationStruct * _Nullable waterMark MTR_DEPRECATED( + "Please use MTRContentLauncherClusterBrandingInformationStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -978,6 +1342,12 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRAudioOutputClusterOutputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRAudioOutputClusterOutputInfo : MTRAudioOutputClusterOutputInfoStruct +@property (nonatomic, copy) NSNumber * _Nonnull index MTR_DEPRECATED( + "Please use MTRAudioOutputClusterOutputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull outputType MTR_DEPRECATED( + "Please use MTRAudioOutputClusterOutputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nonnull name MTR_DEPRECATED( + "Please use MTRAudioOutputClusterOutputInfoStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -994,6 +1364,7 @@ MTR_DEPRECATED("Please use MTRApplicationLauncherClusterApplicationStruct", ios( tvos(16.1, 16.4)) @interface MTRApplicationLauncherClusterApplication : MTRApplicationLauncherClusterApplicationStruct @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRApplicationLauncherClusterApplicationEPStruct : NSObject @property (nonatomic, copy) MTRApplicationLauncherClusterApplicationStruct * _Nonnull application API_AVAILABLE( @@ -1004,6 +1375,12 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRApplicationLauncherClusterApplicationEPStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRApplicationLauncherClusterApplicationEP : MTRApplicationLauncherClusterApplicationEPStruct +@property (nonatomic, copy) MTRApplicationLauncherClusterApplicationStruct * _Nonnull application MTR_DEPRECATED( + "Please use MTRApplicationLauncherClusterApplicationEPStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable endpoint MTR_DEPRECATED("Please use MTRApplicationLauncherClusterApplicationEPStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1036,7 +1413,24 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterSimpleStruct : MTRUnitTestingClusterSimpleStruct +@property (nonatomic, copy) NSNumber * _Nonnull a MTR_DEPRECATED( + "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull b MTR_DEPRECATED( + "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull c MTR_DEPRECATED( + "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSData * _Nonnull d MTR_DEPRECATED( + "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nonnull e MTR_DEPRECATED( + "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull f MTR_DEPRECATED( + "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull g MTR_DEPRECATED( + "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull h MTR_DEPRECATED( + "Please use MTRUnitTestingClusterSimpleStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterTestFabricScoped : NSObject @property (nonatomic, copy) NSNumber * _Nonnull fabricSensitiveInt8u API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1059,7 +1453,24 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterTestFabricScoped : MTRUnitTestingClusterTestFabricScoped +@property (nonatomic, copy) NSNumber * _Nonnull fabricSensitiveInt8u MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nullable optionalFabricSensitiveInt8u MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nullable nullableFabricSensitiveInt8u MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nullable nullableOptionalFabricSensitiveInt8u MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSString * _Nonnull fabricSensitiveCharString MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull fabricSensitiveStruct MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nonnull fabricSensitiveInt8uList MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestFabricScoped", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterNullablesAndOptionalsStruct : NSObject @property (nonatomic, copy) NSNumber * _Nullable nullableInt API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1085,7 +1496,44 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterNullablesAndOptionalsStruct : MTRUnitTestingClusterNullablesAndOptionalsStruct +@property (nonatomic, copy) + NSNumber * _Nullable nullableInt MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable optionalInt MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSNumber * _Nullable nullableOptionalInt MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSString * _Nullable nullableString MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSString * _Nullable optionalString MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSString * _Nullable nullableOptionalString MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableStruct MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable optionalStruct MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nullable nullableOptionalStruct MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), + tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSArray * _Nullable nullableList MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSArray * _Nullable optionalList MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) + NSArray * _Nullable nullableOptionalList MTR_DEPRECATED("Please use MTRUnitTestingClusterNullablesAndOptionalsStruct", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterNestedStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull a API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1097,7 +1545,14 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRUnitTestingClusterNestedStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterNestedStruct : MTRUnitTestingClusterNestedStruct +@property (nonatomic, copy) NSNumber * _Nonnull a MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull b MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterNestedStructList : NSObject @property (nonatomic, copy) NSNumber * _Nonnull a API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1113,7 +1568,22 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRUnitTestingClusterNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterNestedStructList : MTRUnitTestingClusterNestedStructList +@property (nonatomic, copy) NSNumber * _Nonnull a MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull b MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull c MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nonnull d MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nonnull e MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nonnull f MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nonnull g MTR_DEPRECATED( + "Please use MTRUnitTestingClusterNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterDoubleNestedStructList : NSObject @property (nonatomic, copy) NSArray * _Nonnull a API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1122,7 +1592,10 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRUnitTestingClusterDoubleNestedStructList", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterDoubleNestedStructList : MTRUnitTestingClusterDoubleNestedStructList +@property (nonatomic, copy) NSArray * _Nonnull a MTR_DEPRECATED("Please use MTRUnitTestingClusterDoubleNestedStructList", + ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterTestListStructOctet : NSObject @property (nonatomic, copy) NSNumber * _Nonnull member1 API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1132,6 +1605,10 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRUnitTestingClusterTestListStructOctet", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterTestListStructOctet : MTRUnitTestingClusterTestListStructOctet +@property (nonatomic, copy) NSNumber * _Nonnull member1 MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestListStructOctet", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSData * _Nonnull member2 MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestListStructOctet", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1148,6 +1625,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED( "Please use MTRUnitTestingClusterTestEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterTestEventEvent : MTRUnitTestingClusterTestEventEvent +@property (nonatomic, copy) NSNumber * _Nonnull arg1 MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull arg2 MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull arg3 MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) MTRTestClusterClusterSimpleStruct * _Nonnull arg4 MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nonnull arg5 MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSArray * _Nonnull arg6 MTR_DEPRECATED( + "Please use MTRUnitTestingClusterTestEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1158,6 +1647,9 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) MTR_DEPRECATED("Please use MTRUnitTestingClusterTestFabricScopedEventEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRTestClusterClusterTestFabricScopedEventEvent : MTRUnitTestingClusterTestFabricScopedEventEvent +@property (nonatomic, copy) + NSNumber * _Nonnull fabricIndex MTR_DEPRECATED("Please use MTRUnitTestingClusterTestFabricScopedEventEvent", ios(16.1, 16.4), + macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 64a915d6c9cccd..a1eda26e280ad7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -143,6 +143,7 @@ - (NSNumber * _Nonnull)type @end @implementation MTRDescriptorClusterDeviceType : MTRDescriptorClusterDeviceTypeStruct +@dynamic revision; @end @implementation MTRBindingClusterTargetStruct @@ -220,6 +221,9 @@ - (NSString *)description @end @implementation MTRAccessControlClusterTarget : MTRAccessControlClusterAccessControlTargetStruct +@dynamic cluster; +@dynamic endpoint; +@dynamic deviceType; @end @implementation MTRAccessControlClusterAccessControlEntryStruct @@ -264,6 +268,11 @@ - (NSString *)description @end @implementation MTRAccessControlClusterAccessControlEntry : MTRAccessControlClusterAccessControlEntryStruct +@dynamic privilege; +@dynamic authMode; +@dynamic subjects; +@dynamic targets; +@dynamic fabricIndex; @end @implementation MTRAccessControlClusterAccessControlExtensionStruct @@ -298,6 +307,8 @@ - (NSString *)description @end @implementation MTRAccessControlClusterExtensionEntry : MTRAccessControlClusterAccessControlExtensionStruct +@dynamic data; +@dynamic fabricIndex; @end @implementation MTRAccessControlClusterAccessControlEntryChangedEvent @@ -566,6 +577,8 @@ - (NSString *)description @end @implementation MTRBasicClusterCapabilityMinimaStruct : MTRBasicInformationClusterCapabilityMinimaStruct +@dynamic caseSessionsPerFabric; +@dynamic subscriptionsPerFabric; @end @implementation MTRBasicInformationClusterProductAppearanceStruct @@ -628,6 +641,7 @@ - (NSString *)description @end @implementation MTRBasicClusterStartUpEvent : MTRBasicInformationClusterStartUpEvent +@dynamic softwareVersion; @end @implementation MTRBasicInformationClusterShutDownEvent @@ -685,6 +699,7 @@ - (NSString *)description @end @implementation MTRBasicClusterLeaveEvent : MTRBasicInformationClusterLeaveEvent +@dynamic fabricIndex; @end @implementation MTRBasicInformationClusterReachableChangedEvent @@ -716,6 +731,7 @@ - (NSString *)description @end @implementation MTRBasicClusterReachableChangedEvent : MTRBasicInformationClusterReachableChangedEvent +@dynamic reachableNewValue; @end @implementation MTROTASoftwareUpdateRequestorClusterProviderLocation @@ -753,6 +769,9 @@ - (NSString *)description @end @implementation MTROtaSoftwareUpdateRequestorClusterProviderLocation : MTROTASoftwareUpdateRequestorClusterProviderLocation +@dynamic providerNodeID; +@dynamic endpoint; +@dynamic fabricIndex; @end @implementation MTROTASoftwareUpdateRequestorClusterStateTransitionEvent @@ -794,6 +813,10 @@ - (NSString *)description @end @implementation MTROtaSoftwareUpdateRequestorClusterStateTransitionEvent : MTROTASoftwareUpdateRequestorClusterStateTransitionEvent +@dynamic previousState; +@dynamic newState; +@dynamic reason; +@dynamic targetSoftwareVersion; @end @implementation MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent @@ -828,6 +851,8 @@ - (NSString *)description @end @implementation MTROtaSoftwareUpdateRequestorClusterVersionAppliedEvent : MTROTASoftwareUpdateRequestorClusterVersionAppliedEvent +@dynamic softwareVersion; +@dynamic productID; @end @implementation MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent @@ -869,6 +894,10 @@ - (NSString *)description @end @implementation MTROtaSoftwareUpdateRequestorClusterDownloadErrorEvent : MTROTASoftwareUpdateRequestorClusterDownloadErrorEvent +@dynamic softwareVersion; +@dynamic bytesDownloaded; +@dynamic progressPercent; +@dynamic platformCode; @end @implementation MTRPowerSourceClusterBatChargeFaultChangeType @@ -1122,6 +1151,8 @@ - (NSString *)description @end @implementation MTRNetworkCommissioningClusterNetworkInfo : MTRNetworkCommissioningClusterNetworkInfoStruct +@dynamic networkID; +@dynamic connected; @end @implementation MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct @@ -1178,6 +1209,14 @@ - (NSString *)description @implementation MTRNetworkCommissioningClusterThreadInterfaceScanResult : MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct +@dynamic panId; +@dynamic extendedPanId; +@dynamic networkName; +@dynamic channel; +@dynamic version; +@dynamic extendedAddress; +@dynamic rssi; +@dynamic lqi; @end @implementation MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct @@ -1226,6 +1265,12 @@ - (NSString *)description @end @implementation MTRNetworkCommissioningClusterWiFiInterfaceScanResult : MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct +@dynamic security; +@dynamic ssid; +@dynamic bssid; +@dynamic channel; +@dynamic wiFiBand; +@dynamic rssi; @end @implementation MTRGeneralDiagnosticsClusterNetworkInterface @@ -1281,6 +1326,14 @@ - (NSString *)description @end @implementation MTRGeneralDiagnosticsClusterNetworkInterfaceType : MTRGeneralDiagnosticsClusterNetworkInterface +@dynamic name; +@dynamic isOperational; +@dynamic offPremiseServicesReachableIPv4; +@dynamic offPremiseServicesReachableIPv6; +@dynamic hardwareAddress; +@dynamic iPv4Addresses; +@dynamic iPv6Addresses; +@dynamic type; @end @implementation MTRGeneralDiagnosticsClusterHardwareFaultChangeEvent @@ -1446,6 +1499,11 @@ - (NSString *)description @end @implementation MTRSoftwareDiagnosticsClusterThreadMetrics : MTRSoftwareDiagnosticsClusterThreadMetricsStruct +@dynamic id; +@dynamic name; +@dynamic stackFreeCurrent; +@dynamic stackFreeMinimum; +@dynamic stackSize; @end @implementation MTRSoftwareDiagnosticsClusterSoftwareFaultEvent @@ -1555,6 +1613,20 @@ - (NSString *)description @end @implementation MTRThreadNetworkDiagnosticsClusterNeighborTable : MTRThreadNetworkDiagnosticsClusterNeighborTableStruct +@dynamic extAddress; +@dynamic age; +@dynamic rloc16; +@dynamic linkFrameCounter; +@dynamic mleFrameCounter; +@dynamic lqi; +@dynamic averageRssi; +@dynamic lastRssi; +@dynamic frameErrorRate; +@dynamic messageErrorRate; +@dynamic rxOnWhenIdle; +@dynamic fullThreadDevice; +@dynamic fullNetworkData; +@dynamic isChild; @end @implementation MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents @@ -1682,6 +1754,16 @@ - (NSString *)description @end @implementation MTRThreadNetworkDiagnosticsClusterRouteTable : MTRThreadNetworkDiagnosticsClusterRouteTableStruct +@dynamic extAddress; +@dynamic rloc16; +@dynamic routerId; +@dynamic nextHop; +@dynamic pathCost; +@dynamic lqiIn; +@dynamic lqiOut; +@dynamic age; +@dynamic allocated; +@dynamic linkEstablished; @end @implementation MTRThreadNetworkDiagnosticsClusterSecurityPolicy @@ -1896,6 +1978,9 @@ - (NSString *)description @end @implementation MTRTimeSynchronizationClusterDstOffsetType : MTRTimeSynchronizationClusterDSTOffsetStruct +@dynamic offset; +@dynamic validStarting; +@dynamic validUntil; @end @implementation MTRTimeSynchronizationClusterTimeZoneStruct @@ -1933,6 +2018,9 @@ - (NSString *)description @end @implementation MTRTimeSynchronizationClusterTimeZoneType : MTRTimeSynchronizationClusterTimeZoneStruct +@dynamic offset; +@dynamic validAt; +@dynamic name; @end @implementation MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct @@ -1995,6 +2083,7 @@ - (NSString *)description @end @implementation MTRBridgedDeviceBasicClusterStartUpEvent : MTRBridgedDeviceBasicInformationClusterStartUpEvent +@dynamic softwareVersion; @end @implementation MTRBridgedDeviceBasicInformationClusterShutDownEvent @@ -2078,6 +2167,7 @@ - (NSString *)description @end @implementation MTRBridgedDeviceBasicClusterReachableChangedEvent : MTRBridgedDeviceBasicInformationClusterReachableChangedEvent +@dynamic reachableNewValue; @end @implementation MTRSwitchClusterSwitchLatchedEvent @@ -2367,6 +2457,9 @@ - (NSNumber * _Nonnull)nodeId @end @implementation MTROperationalCredentialsClusterFabricDescriptor : MTROperationalCredentialsClusterFabricDescriptorStruct +@dynamic rootPublicKey; +@dynamic label; +@dynamic fabricIndex; @end @implementation MTROperationalCredentialsClusterNOCStruct @@ -2650,6 +2743,8 @@ - (NSString *)description @end @implementation MTRModeSelectClusterSemanticTag : MTRModeSelectClusterSemanticTagStruct +@dynamic mfgCode; +@dynamic value; @end @implementation MTRModeSelectClusterModeOptionStruct @@ -2718,6 +2813,8 @@ - (NSString *)description @end @implementation MTRDoorLockClusterDlCredential : MTRDoorLockClusterCredentialStruct +@dynamic credentialType; +@dynamic credentialIndex; @end @implementation MTRDoorLockClusterDoorLockAlarmEvent @@ -3382,6 +3479,11 @@ - (NSString *)description @end @implementation MTRChannelClusterChannelInfo : MTRChannelClusterChannelInfoStruct +@dynamic majorNumber; +@dynamic minorNumber; +@dynamic name; +@dynamic callSign; +@dynamic affiliateCallSign; @end @implementation MTRChannelClusterLineupInfoStruct @@ -3423,6 +3525,10 @@ - (NSString *)description @end @implementation MTRChannelClusterLineupInfo : MTRChannelClusterLineupInfoStruct +@dynamic operatorName; +@dynamic lineupName; +@dynamic postalCode; +@dynamic lineupInfoType; @end @implementation MTRTargetNavigatorClusterTargetInfoStruct @@ -3457,6 +3563,8 @@ - (NSString *)description @end @implementation MTRTargetNavigatorClusterTargetInfo : MTRTargetNavigatorClusterTargetInfoStruct +@dynamic identifier; +@dynamic name; @end @implementation MTRMediaPlaybackClusterPlaybackPositionStruct @@ -3491,6 +3599,8 @@ - (NSString *)description @end @implementation MTRMediaPlaybackClusterPlaybackPosition : MTRMediaPlaybackClusterPlaybackPositionStruct +@dynamic updatedAt; +@dynamic position; @end @implementation MTRMediaInputClusterInputInfoStruct @@ -3531,6 +3641,10 @@ - (NSString *)description @end @implementation MTRMediaInputClusterInputInfo : MTRMediaInputClusterInputInfoStruct +@dynamic index; +@dynamic inputType; +@dynamic name; +@dynamic descriptionString; @end @implementation MTRContentLauncherClusterDimensionStruct @@ -3568,6 +3682,9 @@ - (NSString *)description @end @implementation MTRContentLauncherClusterDimension : MTRContentLauncherClusterDimensionStruct +@dynamic width; +@dynamic height; +@dynamic metric; @end @implementation MTRContentLauncherClusterAdditionalInfoStruct @@ -3602,6 +3719,8 @@ - (NSString *)description @end @implementation MTRContentLauncherClusterAdditionalInfo : MTRContentLauncherClusterAdditionalInfoStruct +@dynamic name; +@dynamic value; @end @implementation MTRContentLauncherClusterParameterStruct @@ -3639,6 +3758,9 @@ - (NSString *)description @end @implementation MTRContentLauncherClusterParameter : MTRContentLauncherClusterParameterStruct +@dynamic type; +@dynamic value; +@dynamic externalIDList; @end @implementation MTRContentLauncherClusterContentSearchStruct @@ -3670,6 +3792,7 @@ - (NSString *)description @end @implementation MTRContentLauncherClusterContentSearch : MTRContentLauncherClusterContentSearchStruct +@dynamic parameterList; @end @implementation MTRContentLauncherClusterStyleInformationStruct @@ -3717,6 +3840,8 @@ - (NSString * _Nullable)imageUrl @end @implementation MTRContentLauncherClusterStyleInformation : MTRContentLauncherClusterStyleInformationStruct +@dynamic color; +@dynamic size; @end @implementation MTRContentLauncherClusterBrandingInformationStruct @@ -3764,6 +3889,12 @@ - (NSString *)description @end @implementation MTRContentLauncherClusterBrandingInformation : MTRContentLauncherClusterBrandingInformationStruct +@dynamic providerName; +@dynamic background; +@dynamic logo; +@dynamic progressBar; +@dynamic splash; +@dynamic waterMark; @end @implementation MTRAudioOutputClusterOutputInfoStruct @@ -3801,6 +3932,9 @@ - (NSString *)description @end @implementation MTRAudioOutputClusterOutputInfo : MTRAudioOutputClusterOutputInfoStruct +@dynamic index; +@dynamic outputType; +@dynamic name; @end @implementation MTRApplicationLauncherClusterApplicationStruct @@ -3889,6 +4023,8 @@ - (NSString *)description @end @implementation MTRApplicationLauncherClusterApplicationEP : MTRApplicationLauncherClusterApplicationEPStruct +@dynamic application; +@dynamic endpoint; @end @implementation MTRApplicationBasicClusterApplicationStruct @@ -3996,6 +4132,14 @@ - (NSString *)description @end @implementation MTRTestClusterClusterSimpleStruct : MTRUnitTestingClusterSimpleStruct +@dynamic a; +@dynamic b; +@dynamic c; +@dynamic d; +@dynamic e; +@dynamic f; +@dynamic g; +@dynamic h; @end @implementation MTRUnitTestingClusterTestFabricScoped @@ -4053,6 +4197,14 @@ - (NSString *)description @end @implementation MTRTestClusterClusterTestFabricScoped : MTRUnitTestingClusterTestFabricScoped +@dynamic fabricSensitiveInt8u; +@dynamic optionalFabricSensitiveInt8u; +@dynamic nullableFabricSensitiveInt8u; +@dynamic nullableOptionalFabricSensitiveInt8u; +@dynamic fabricSensitiveCharString; +@dynamic fabricSensitiveStruct; +@dynamic fabricSensitiveInt8uList; +@dynamic fabricIndex; @end @implementation MTRUnitTestingClusterNullablesAndOptionalsStruct @@ -4122,6 +4274,18 @@ - (NSString *)description @end @implementation MTRTestClusterClusterNullablesAndOptionalsStruct : MTRUnitTestingClusterNullablesAndOptionalsStruct +@dynamic nullableInt; +@dynamic optionalInt; +@dynamic nullableOptionalInt; +@dynamic nullableString; +@dynamic optionalString; +@dynamic nullableOptionalString; +@dynamic nullableStruct; +@dynamic optionalStruct; +@dynamic nullableOptionalStruct; +@dynamic nullableList; +@dynamic optionalList; +@dynamic nullableOptionalList; @end @implementation MTRUnitTestingClusterNestedStruct @@ -4159,6 +4323,9 @@ - (NSString *)description @end @implementation MTRTestClusterClusterNestedStruct : MTRUnitTestingClusterNestedStruct +@dynamic a; +@dynamic b; +@dynamic c; @end @implementation MTRUnitTestingClusterNestedStructList @@ -4208,6 +4375,13 @@ - (NSString *)description @end @implementation MTRTestClusterClusterNestedStructList : MTRUnitTestingClusterNestedStructList +@dynamic a; +@dynamic b; +@dynamic c; +@dynamic d; +@dynamic e; +@dynamic f; +@dynamic g; @end @implementation MTRUnitTestingClusterDoubleNestedStructList @@ -4238,6 +4412,7 @@ - (NSString *)description @end @implementation MTRTestClusterClusterDoubleNestedStructList : MTRUnitTestingClusterDoubleNestedStructList +@dynamic a; @end @implementation MTRUnitTestingClusterTestListStructOctet @@ -4272,6 +4447,8 @@ - (NSString *)description @end @implementation MTRTestClusterClusterTestListStructOctet : MTRUnitTestingClusterTestListStructOctet +@dynamic member1; +@dynamic member2; @end @implementation MTRUnitTestingClusterTestEventEvent @@ -4318,6 +4495,12 @@ - (NSString *)description @end @implementation MTRTestClusterClusterTestEventEvent : MTRUnitTestingClusterTestEventEvent +@dynamic arg1; +@dynamic arg2; +@dynamic arg3; +@dynamic arg4; +@dynamic arg5; +@dynamic arg6; @end @implementation MTRUnitTestingClusterTestFabricScopedEventEvent @@ -4349,6 +4532,7 @@ - (NSString *)description @end @implementation MTRTestClusterClusterTestFabricScopedEventEvent : MTRUnitTestingClusterTestFabricScopedEventEvent +@dynamic fabricIndex; @end NS_ASSUME_NONNULL_END diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp index 7c09c9f12edd61..8560dd605346ae 100644 --- a/src/inet/InetInterface.cpp +++ b/src/inet/InetInterface.cpp @@ -562,6 +562,11 @@ bool InterfaceIterator::IsUp() return (GetFlags() & IFF_UP) != 0; } +bool InterfaceIterator::IsLoopback() +{ + return (GetFlags() & IFF_LOOPBACK) != 0; +} + bool InterfaceIterator::SupportsMulticast() { return (GetFlags() & IFF_MULTICAST) != 0; @@ -706,6 +711,11 @@ bool InterfaceAddressIterator::IsUp() return HasCurrent() && (mCurAddr->ifa_flags & IFF_UP) != 0; } +bool InterfaceAddressIterator::IsLoopback() +{ + return HasCurrent() && (mCurAddr->ifa_flags & IFF_LOOPBACK) != 0; +} + bool InterfaceAddressIterator::SupportsMulticast() { return HasCurrent() && (mCurAddr->ifa_flags & IFF_MULTICAST) != 0; diff --git a/src/inet/InetInterface.h b/src/inet/InetInterface.h index 8a182294476a6e..9603ba80c3ed05 100644 --- a/src/inet/InetInterface.h +++ b/src/inet/InetInterface.h @@ -310,6 +310,14 @@ class InterfaceIterator */ bool IsUp(); + /** + * Returns whether the current network interface is a loopback interface + * + * @return \c true if current network interface is a loopback interface, \c false + * if not, or if the iterator is positioned beyond the end of the list. + */ + bool IsLoopback(); + /** * Returns whether the current network interface supports multicast. * @@ -504,6 +512,14 @@ class DLL_EXPORT InterfaceAddressIterator */ bool IsUp(); + /** + * Returns whether the current network interface is a loopback interface + * + * @return \c true if current network interface is a loopback interface, \c false + * if not, or if the iterator is positioned beyond the end of the list. + */ + bool IsLoopback(); + /** * Returns whether the network interface associated with the current interface address supports multicast. * diff --git a/src/lib/format/tests/TestDecoding.cpp b/src/lib/format/tests/TestDecoding.cpp index f9ef31719f5b6b..3c6edd3000fa3a 100644 --- a/src/lib/format/tests/TestDecoding.cpp +++ b/src/lib/format/tests/TestDecoding.cpp @@ -34,7 +34,12 @@ using namespace chip::TLV; using namespace chip::TLVMeta; using namespace chip::TestData; -const Entry _empty_item[0] = {}; +// size 1 to avoid compilers complaining about empty arrays +// (not allowed by ISO 9899:2011 6.7.6.2: +// If the expression is a constant expression, it shall have a value greater +// than zero. +// ). We still claim its size is 0 in empty_meta though. +const Entry _empty_item[1] = {}; const std::array, 1> empty_meta = { { { 0, _empty_item } } }; const Entry _FakeProtocolData[] = { diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index a556aaa18be778..b2aaacf633b9af 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -323,6 +323,19 @@ CHIP_ERROR ReliableMessageMgr::SendFromRetransTable(RetransTableEntry * entry) if (err == CHIP_NO_ERROR) { +#if CONFIG_DEVICE_LAYER && CHIP_CONFIG_ENABLE_ICD_SERVER + DeviceLayer::ChipDeviceEvent event; + // Here always set ExpectResponse to false. + // The Initial message sent from the Exchange Context will have set ExpectResponse to the correct value. + // If we are expecting a Response, the ICD will already be in a state waiting for the response (or timeout). + event.Type = DeviceLayer::DeviceEventType::kChipMsgSentEvent; + event.MessageSent.ExpectResponse = false; + CHIP_ERROR status = DeviceLayer::PlatformMgr().PostEvent(&event); + if (status != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to post retransmit message sent event %" CHIP_ERROR_FORMAT, status.Format()); + } +#endif // CONFIG_DEVICE_LAYER #if CHIP_CONFIG_RESOLVE_PEER_ON_FIRST_TRANSMIT_FAILURE const ExchangeManager * exchangeMgr = entry->ec->GetExchangeMgr(); // TODO: investigate why in ReliableMessageMgr::CheckResendApplicationMessageWithPeerExchange unit test released exchange diff --git a/src/platform/Ameba/AmebaUtils.cpp b/src/platform/Ameba/AmebaUtils.cpp index 12118dfb14e9f3..db97f98782d735 100644 --- a/src/platform/Ameba/AmebaUtils.cpp +++ b/src/platform/Ameba/AmebaUtils.cpp @@ -108,8 +108,8 @@ CHIP_ERROR AmebaUtils::GetWiFiConfig(rtw_wifi_config_t * config) &credentialsLen); SuccessOrExit(err); - config->ssid_len = ssidLen; - config->password_len = credentialsLen; + config->ssid_len = strlen((const char *) config->ssid); + config->password_len = strlen((const char *) config->password); exit: return err; diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index d42886b0f75ac3..18f37d06131806 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -758,53 +758,23 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) } } -void ConnectivityManagerImpl::OnStationIPv4AddressAvailable(void) +void ConnectivityManagerImpl::OnStationIPv4v6AddressAvailable(void) { uint8_t * ip = LwIP_GetIP(&xnetif[0]); uint8_t * gw = LwIP_GetGW(&xnetif[0]); uint8_t * msk = LwIP_GetMASK(&xnetif[0]); -#if CHIP_PROGRESS_LOGGING - { - ChipLogProgress(DeviceLayer, "\n\r\tIP => %d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); - ChipLogProgress(DeviceLayer, "\n\r\tGW => %d.%d.%d.%d\n\r", gw[0], gw[1], gw[2], gw[3]); - ChipLogProgress(DeviceLayer, "\n\r\tmsk => %d.%d.%d.%d\n\r", msk[0], msk[1], msk[2], msk[3]); - } -#endif // CHIP_PROGRESS_LOGGING - - RefreshMessageLayer(); - - UpdateInternetConnectivityState(); - - ChipDeviceEvent event; - event.Type = DeviceEventType::kInterfaceIpAddressChanged; - event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV4_Assigned; - PlatformMgr().PostEventOrDie(&event); -} - -void ConnectivityManagerImpl::OnStationIPv4AddressLost(void) -{ - ChipLogProgress(DeviceLayer, "IPv4 address lost on WiFi station interface"); - - RefreshMessageLayer(); - - UpdateInternetConnectivityState(); - - ChipDeviceEvent event; - event.Type = DeviceEventType::kInterfaceIpAddressChanged; - event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV4_Lost; - PlatformMgr().PostEventOrDie(&event); -} - -void ConnectivityManagerImpl::OnIPv6AddressAvailable(void) -{ #if LWIP_VERSION_MAJOR > 2 || LWIP_VERSION_MINOR > 0 #if LWIP_IPV6 uint8_t * ipv6_0 = LwIP_GetIPv6_linklocal(&xnetif[0]); uint8_t * ipv6_1 = LwIP_GetIPv6_global(&xnetif[0]); #endif #endif // LWIP_VERSION_MAJOR > 2 || LWIP_VERSION_MINOR > 0 + #if CHIP_PROGRESS_LOGGING { + ChipLogProgress(DeviceLayer, "\n\r\tIP => %d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); + ChipLogProgress(DeviceLayer, "\n\r\tGW => %d.%d.%d.%d\n\r", gw[0], gw[1], gw[2], gw[3]); + ChipLogProgress(DeviceLayer, "\n\r\tmsk => %d.%d.%d.%d\n\r", msk[0], msk[1], msk[2], msk[3]); #if LWIP_VERSION_MAJOR > 2 || LWIP_VERSION_MINOR > 0 #if LWIP_IPV6 ChipLogProgress(DeviceLayer, @@ -830,6 +800,20 @@ void ConnectivityManagerImpl::OnIPv6AddressAvailable(void) PlatformMgr().PostEventOrDie(&event); } +void ConnectivityManagerImpl::OnStationIPv4v6AddressLost(void) +{ + ChipLogProgress(DeviceLayer, "IPv4 address lost on WiFi station interface"); + + RefreshMessageLayer(); + + UpdateInternetConnectivityState(); + + ChipDeviceEvent event; + event.Type = DeviceEventType::kInterfaceIpAddressChanged; + event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV4_Lost; + PlatformMgr().PostEventOrDie(&event); +} + void ConnectivityManagerImpl::RefreshMessageLayer(void) {} void ConnectivityManagerImpl::RtkWiFiStationConnectedHandler(char * buf, int buf_len, int flags, void * userdata) @@ -859,17 +843,14 @@ void ConnectivityManagerImpl::RtkWiFiScanCompletedHandler(void) void ConnectivityManagerImpl::DHCPProcessThread(void * param) { matter_lwip_dhcp(); - PlatformMgr().LockChipStack(); - sInstance.OnStationIPv4AddressAvailable(); - PlatformMgr().UnlockChipStack(); #if LWIP_VERSION_MAJOR > 2 || LWIP_VERSION_MINOR > 0 #if LWIP_IPV6 matter_lwip_dhcp6(); - PlatformMgr().LockChipStack(); - sInstance.OnIPv6AddressAvailable(); - PlatformMgr().UnlockChipStack(); #endif #endif // LWIP_VERSION_MAJOR > 2 || LWIP_VERSION_MINOR > 0 + PlatformMgr().LockChipStack(); + sInstance.OnStationIPv4v6AddressAvailable(); + PlatformMgr().UnlockChipStack(); vTaskDelete(NULL); } diff --git a/src/platform/Ameba/ConnectivityManagerImpl.h b/src/platform/Ameba/ConnectivityManagerImpl.h index c4c04c5346e482..c8a3f3ed019fb2 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.h +++ b/src/platform/Ameba/ConnectivityManagerImpl.h @@ -141,9 +141,8 @@ class ConnectivityManagerImpl final : public ConnectivityManager, static void DriveAPState(::chip::System::Layer * aLayer, void * aAppState); void UpdateInternetConnectivityState(void); - void OnStationIPv4AddressAvailable(void); - void OnStationIPv4AddressLost(void); - void OnIPv6AddressAvailable(void); + void OnStationIPv4v6AddressAvailable(void); + void OnStationIPv4v6AddressLost(void); #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI diff --git a/src/platform/Linux/DnssdImpl.cpp b/src/platform/Linux/DnssdImpl.cpp index eac8003e40a3f4..289ae41d2bec88 100644 --- a/src/platform/Linux/DnssdImpl.cpp +++ b/src/platform/Linux/DnssdImpl.cpp @@ -332,7 +332,7 @@ CHIP_ERROR MdnsAvahi::Init(DnssdAsyncReturnCallback initCallback, DnssdAsyncRetu VerifyOrExit(initCallback != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(errorCallback != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mClient == nullptr && mGroup == nullptr, error = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mClient == nullptr && mPublishedGroups.empty(), error = CHIP_ERROR_INCORRECT_STATE); mInitCallback = initCallback; mErrorCallback = errorCallback; mAsyncReturnContext = context; @@ -346,11 +346,7 @@ CHIP_ERROR MdnsAvahi::Init(DnssdAsyncReturnCallback initCallback, DnssdAsyncRetu void MdnsAvahi::Shutdown() { - if (mGroup) - { - avahi_entry_group_free(mGroup); - mGroup = nullptr; - } + StopPublish(); if (mClient) { avahi_client_free(mClient); @@ -361,19 +357,11 @@ void MdnsAvahi::Shutdown() CHIP_ERROR MdnsAvahi::SetHostname(const char * hostname) { CHIP_ERROR error = CHIP_NO_ERROR; - int avahiRet; VerifyOrExit(mClient != nullptr, error = CHIP_ERROR_INCORRECT_STATE); - avahiRet = avahi_client_set_host_name(mClient, hostname); - if (avahiRet == AVAHI_ERR_ACCESS_DENIED) - { - ChipLogError(DeviceLayer, "Cannot set hostname on this system, continue anyway..."); - } - else if (avahiRet != AVAHI_OK && avahiRet != AVAHI_ERR_NO_CHANGE) - { - error = CHIP_ERROR_INTERNAL; - } - + // Note: we do no longer set the primary hostname here, as other services + // on the platform might not be happy with the matter mandated hostname. + // Instead, we'll establish our own hostname when needed (see PublishService()) exit: return error; } @@ -390,16 +378,8 @@ void MdnsAvahi::HandleClientState(AvahiClient * client, AvahiClientState state) case AVAHI_CLIENT_S_RUNNING: ChipLogProgress(DeviceLayer, "Avahi client registered"); mClient = client; - mGroup = avahi_entry_group_new(client, HandleGroupState, this); - if (mGroup == nullptr) - { - ChipLogError(DeviceLayer, "Failed to create avahi group: %s", avahi_strerror(avahi_client_errno(client))); - mInitCallback(mAsyncReturnContext, CHIP_ERROR_OPEN_FAILED); - } - else - { - mInitCallback(mAsyncReturnContext, CHIP_NO_ERROR); - } + // no longer create groups here, but on a by-service basis in PublishService() + mInitCallback(mAsyncReturnContext, CHIP_NO_ERROR); break; case AVAHI_CLIENT_FAILURE: ChipLogError(DeviceLayer, "Avahi client failure"); @@ -408,22 +388,8 @@ void MdnsAvahi::HandleClientState(AvahiClient * client, AvahiClientState state) case AVAHI_CLIENT_S_COLLISION: case AVAHI_CLIENT_S_REGISTERING: ChipLogProgress(DeviceLayer, "Avahi re-register required"); - if (mGroup != nullptr) - { - avahi_entry_group_reset(mGroup); - avahi_entry_group_free(mGroup); - } - mGroup = avahi_entry_group_new(client, HandleGroupState, this); - mPublishedServices.clear(); - if (mGroup == nullptr) - { - ChipLogError(DeviceLayer, "Failed to create avahi group: %s", avahi_strerror(avahi_client_errno(client))); - mErrorCallback(mAsyncReturnContext, CHIP_ERROR_OPEN_FAILED); - } - else - { - mErrorCallback(mAsyncReturnContext, CHIP_ERROR_FORCED_RESET); - } + StopPublish(); + mErrorCallback(mAsyncReturnContext, CHIP_ERROR_FORCED_RESET); break; case AVAHI_CLIENT_CONNECTING: ChipLogProgress(DeviceLayer, "Avahi connecting"); @@ -449,7 +415,7 @@ void MdnsAvahi::HandleGroupState(AvahiEntryGroup * group, AvahiEntryGroupState s break; case AVAHI_ENTRY_GROUP_FAILURE: ChipLogError(DeviceLayer, "Avahi group internal failure %s", - avahi_strerror(avahi_client_errno(avahi_entry_group_get_client(mGroup)))); + avahi_strerror(avahi_client_errno(avahi_entry_group_get_client(group)))); mErrorCallback(mAsyncReturnContext, CHIP_ERROR_INTERNAL); break; case AVAHI_ENTRY_GROUP_UNCOMMITED: @@ -462,50 +428,130 @@ CHIP_ERROR MdnsAvahi::PublishService(const DnssdService & service, DnssdPublishC { std::ostringstream keyBuilder; std::string key; - std::string type = GetFullType(service.mType, service.mProtocol); - CHIP_ERROR error = CHIP_NO_ERROR; - AvahiStringList * text = nullptr; + std::string type = GetFullType(service.mType, service.mProtocol); + std::string matterHostname; + CHIP_ERROR error = CHIP_NO_ERROR; + AvahiStringList * text = nullptr; + AvahiEntryGroup * group = nullptr; + const char * mainHostname = nullptr; AvahiIfIndex interface = service.mInterface.IsPresent() ? static_cast(service.mInterface.GetPlatformInterface()) : AVAHI_IF_UNSPEC; + AvahiProtocol protocol = ToAvahiProtocol(service.mAddressType); keyBuilder << service.mName << "." << type << service.mPort << "." << interface; key = keyBuilder.str(); ChipLogProgress(DeviceLayer, "PublishService %s", key.c_str()); - - if (mPublishedServices.find(key) == mPublishedServices.end()) + auto publishedgroups_it = mPublishedGroups.find(key); + if (publishedgroups_it != mPublishedGroups.end()) { - SuccessOrExit(error = MakeAvahiStringListFromTextEntries(service.mTextEntries, service.mTextEntrySize, &text)); - - mPublishedServices.emplace(key); - VerifyOrExit(avahi_entry_group_add_service_strlst(mGroup, interface, ToAvahiProtocol(service.mAddressType), - static_cast(0), service.mName, type.c_str(), nullptr, - nullptr, service.mPort, text) == 0, - error = CHIP_ERROR_INTERNAL); - for (size_t i = 0; i < service.mSubTypeSize; i++) + // same service was already published, we need to de-publish it first + int avahiRet = avahi_entry_group_free(publishedgroups_it->second); + if (avahiRet != AVAHI_OK) { - std::ostringstream sstream; + ChipLogError(DeviceLayer, "Cannot remove avahi group: %s", avahi_strerror(avahiRet)); + ExitNow(error = CHIP_ERROR_INTERNAL); + } + mPublishedGroups.erase(publishedgroups_it); + } - sstream << service.mSubTypes[i] << "._sub." << type; + // create fresh group + group = avahi_entry_group_new(mClient, HandleGroupState, this); + VerifyOrExit(group != nullptr, error = CHIP_ERROR_INTERNAL); - VerifyOrExit(avahi_entry_group_add_service_subtype(mGroup, interface, ToAvahiProtocol(service.mAddressType), - static_cast(0), service.mName, type.c_str(), - nullptr, sstream.str().c_str()) == 0, - error = CHIP_ERROR_INTERNAL); - } + // establish the host name (separately from avahi's default host name that the platform might have, + // unless it matches the matter hostname) + mainHostname = avahi_client_get_host_name(mClient); + if (strcmp(mainHostname, service.mHostName) == 0) + { + // main host name is correct, we can use it + matterHostname = std::string(mainHostname) + ".local"; } else { - SuccessOrExit(error = MakeAvahiStringListFromTextEntries(service.mTextEntries, service.mTextEntrySize, &text)); + // we need to establish a matter hostname separately from the platform's default hostname + char b[chip::Inet::IPAddress::kMaxStringLength]; + SuccessOrExit(error = service.mInterface.GetInterfaceName(b, chip::Inet::IPAddress::kMaxStringLength)); + ChipLogDetail(DeviceLayer, "Using addresses from interface id=%d name=%s", service.mInterface.GetPlatformInterface(), b); + matterHostname = std::string(service.mHostName) + ".local"; + // find addresses to publish + for (chip::Inet::InterfaceAddressIterator addr_it; addr_it.HasCurrent(); addr_it.Next()) + { + // only specific interface? + if (service.mInterface.IsPresent() && addr_it.GetInterfaceId() != service.mInterface) + { + continue; + } + if (addr_it.IsUp()) + { + if (addr_it.IsLoopback()) + { + // do not advertise loopback interface addresses + continue; + } + chip::Inet::IPAddress addr; + if ((addr_it.GetAddress(addr) == CHIP_NO_ERROR) && + ((service.mAddressType == chip::Inet::IPAddressType::kAny) || + (addr.IsIPv6() && service.mAddressType == chip::Inet::IPAddressType::kIPv6) +#if INET_CONFIG_ENABLE_IPV4 + || (addr.IsIPv4() && service.mAddressType == chip::Inet::IPAddressType::kIPv4) +#endif + )) + { + VerifyOrExit(addr.ToString(b) != nullptr, error = CHIP_ERROR_INTERNAL); + AvahiAddress a; + VerifyOrExit(avahi_address_parse(b, AVAHI_PROTO_UNSPEC, &a) != nullptr, error = CHIP_ERROR_INTERNAL); + AvahiIfIndex thisinterface = static_cast(addr_it.GetInterfaceId().GetPlatformInterface()); + // Note: NO_REVERSE publish flag is needed because otherwise we can't have more than one hostname + // for reverse resolving IP addresses back to hostnames + VerifyOrExit(avahi_entry_group_add_address(group, // group + thisinterface, // interface + ToAvahiProtocol(addr.Type()), // protocol + AVAHI_PUBLISH_NO_REVERSE, // publish flags + matterHostname.c_str(), // hostname + &a // address + ) == 0, + error = CHIP_ERROR_INTERNAL); + } + } + } + } - VerifyOrExit(avahi_entry_group_update_service_txt_strlst(mGroup, interface, ToAvahiProtocol(service.mAddressType), - static_cast(0), service.mName, type.c_str(), - nullptr, text) == 0, + // create the service + SuccessOrExit(error = MakeAvahiStringListFromTextEntries(service.mTextEntries, service.mTextEntrySize, &text)); + + VerifyOrExit(avahi_entry_group_add_service_strlst(group, interface, protocol, // group, interface, protocol + static_cast(0), // publish flags + service.mName, // service name + type.c_str(), // type + nullptr, // domain + matterHostname.c_str(), // host + service.mPort, // port + text) == 0, // TXT records StringList + error = CHIP_ERROR_INTERNAL); + + // add the subtypes + for (size_t i = 0; i < service.mSubTypeSize; i++) + { + std::ostringstream sstream; + + sstream << service.mSubTypes[i] << "._sub." << type; + + VerifyOrExit(avahi_entry_group_add_service_subtype(group, interface, protocol, static_cast(0), + service.mName, type.c_str(), nullptr, sstream.str().c_str()) == 0, error = CHIP_ERROR_INTERNAL); } + VerifyOrExit(avahi_entry_group_commit(group) == 0, error = CHIP_ERROR_INTERNAL); - VerifyOrExit(avahi_entry_group_commit(mGroup) == 0, error = CHIP_ERROR_INTERNAL); + // group is now published, pass it to the service map + mPublishedGroups[key] = group; + group = nullptr; exit: + if (group != nullptr) + { + avahi_entry_group_free(group); + } + if (text != nullptr) { avahi_string_list_free(text); @@ -521,6 +567,8 @@ CHIP_ERROR MdnsAvahi::PublishService(const DnssdService & service, DnssdPublishC } else { + ChipLogError(DeviceLayer, "PublishService failed: %s", + mClient ? avahi_strerror(avahi_client_errno(mClient)) : "no mClient"); callback(context, nullptr, nullptr, error); } @@ -530,12 +578,19 @@ CHIP_ERROR MdnsAvahi::PublishService(const DnssdService & service, DnssdPublishC CHIP_ERROR MdnsAvahi::StopPublish() { CHIP_ERROR error = CHIP_NO_ERROR; - mPublishedServices.clear(); - if (mGroup) + for (const auto & group : mPublishedGroups) { - VerifyOrExit(avahi_entry_group_reset(mGroup) == 0, error = CHIP_ERROR_INTERNAL); + if (group.second) + { + int avahiRet = avahi_entry_group_free(group.second); + if (avahiRet != AVAHI_OK) + { + ChipLogError(DeviceLayer, "Error freeing avahi group: %s", avahi_strerror(avahiRet)); + error = CHIP_ERROR_INTERNAL; + } + } } -exit: + mPublishedGroups.clear(); return error; } diff --git a/src/platform/Linux/DnssdImpl.h b/src/platform/Linux/DnssdImpl.h index e7111800d3edff..9bad9e8bc019e9 100644 --- a/src/platform/Linux/DnssdImpl.h +++ b/src/platform/Linux/DnssdImpl.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -142,7 +141,7 @@ class MdnsAvahi uint8_t mAttempts = 0; }; - MdnsAvahi() : mClient(nullptr), mGroup(nullptr) {} + MdnsAvahi() : mClient(nullptr) {} static MdnsAvahi sInstance; static void HandleClientState(AvahiClient * client, AvahiClientState state, void * context); @@ -163,9 +162,8 @@ class MdnsAvahi DnssdAsyncReturnCallback mErrorCallback; void * mAsyncReturnContext; - std::set mPublishedServices; AvahiClient * mClient; - AvahiEntryGroup * mGroup; + std::map mPublishedGroups; Poller mPoller; }; diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index 05ad6d1a3b7550..3e4dfaf456c02e 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -2000,10 +2000,6 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_SetPollingInter ChipLogError(DeviceLayer, "Failed to set SED interval to %" PRId32 "ms. Defaulting to %" PRId32 "ms", pollingInterval.count(), curIntervalMS); } - else - { - ChipLogProgress(DeviceLayer, "OpenThread SED interval is %" PRId32 "ms", curIntervalMS); - } return err; } diff --git a/src/platform/bouffalolab/BL602/args.gni b/src/platform/bouffalolab/BL602/args.gni index 9a4f156ce3ee8c..dd482f9a0d6725 100644 --- a/src/platform/bouffalolab/BL602/args.gni +++ b/src/platform/bouffalolab/BL602/args.gni @@ -26,8 +26,6 @@ lwip_platform = "bl602" chip_inet_config_enable_ipv4 = true -chip_enable_rotating_device_id = false - chip_build_tests = false chip_inet_config_enable_dns_resolver = false chip_inet_config_enable_tun_endpoint = false diff --git a/src/platform/bouffalolab/common/BLConfig.h b/src/platform/bouffalolab/common/BLConfig.h index 3b533a08f5e142..916e849bdbc8fb 100644 --- a/src/platform/bouffalolab/common/BLConfig.h +++ b/src/platform/bouffalolab/common/BLConfig.h @@ -70,8 +70,10 @@ class BLConfig static constexpr const char * kConfigKey_ActiveLocale = ("active-locale"); static constexpr const char * kConfigKey_Breadcrumb = ("breadcrumb"); static constexpr const char * kConfigKey_GroupKeyIndex = ("group-key-index"); - static constexpr const char * kBLConfigKey_wifissid = ("blConfig_wifi-ssid"); - static constexpr const char * kBLConfigKey_wifipassword = ("blConfig_wifi-pwd"); + static constexpr const char * kConfigKey_LifeTimeCounter = ("life-time-counter"); + + static constexpr const char * kBLConfigKey_wifissid = ("blConfig_wifi-ssid"); + static constexpr const char * kBLConfigKey_wifipassword = ("blConfig_wifi-pwd"); /** Counter Keys, diagnostic information */ static constexpr const char * kCounterKey_RebootCount = ("reboot-count"); diff --git a/src/platform/bouffalolab/common/BLEManagerImpl.cpp b/src/platform/bouffalolab/common/BLEManagerImpl.cpp index 29c00c2b3226bd..47cfbd8938ade7 100644 --- a/src/platform/bouffalolab/common/BLEManagerImpl.cpp +++ b/src/platform/bouffalolab/common/BLEManagerImpl.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING #include diff --git a/src/platform/bouffalolab/common/CHIPPlatformConfig.h b/src/platform/bouffalolab/common/CHIPPlatformConfig.h index c3e39f3d2d22d9..fce5146e2c4a89 100644 --- a/src/platform/bouffalolab/common/CHIPPlatformConfig.h +++ b/src/platform/bouffalolab/common/CHIPPlatformConfig.h @@ -26,7 +26,7 @@ #define CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_ID 1 #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 2 -#define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY 0x01 +#define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY BLConfig::kConfigKey_LifeTimeCounter // ==================== Security Adaptations ==================== //#define CHIP_CONFIG_SHA256_CONTEXT_SIZE sizeof(bl_sha_ctx_t) diff --git a/src/platform/bouffalolab/common/FactoryDataProvider.cpp b/src/platform/bouffalolab/common/FactoryDataProvider.cpp index 2bee53f6aa9829..77630740776682 100644 --- a/src/platform/bouffalolab/common/FactoryDataProvider.cpp +++ b/src/platform/bouffalolab/common/FactoryDataProvider.cpp @@ -678,7 +678,10 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un #else constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - uniqueIdSpan = MutableByteSpan((uint8_t *) uniqueId, sizeof(uniqueId)); + VerifyOrReturnValue(uniqueIdSpan.size() >= sizeof(uniqueId), CHIP_ERROR_INVALID_ARGUMENT); + + memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); + uniqueIdSpan.reduce_size(sizeof(uniqueId)); return CHIP_NO_ERROR; #endif diff --git a/src/platform/telink/ICDUtil.cpp b/src/platform/telink/ICDUtil.cpp index fd2130c6c22dcb..b3dc9c80bbc9dd 100644 --- a/src/platform/telink/ICDUtil.cpp +++ b/src/platform/telink/ICDUtil.cpp @@ -36,5 +36,5 @@ CHIP_ERROR ICDUtil::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandle agreedMaxInterval = kSubscriptionMaxIntervalPublisherLimit; } - return aReadHandler.SetReportingIntervals(agreedMaxInterval); + return aReadHandler.SetMaxReportingInterval(agreedMaxInterval); } diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 2e175d6ffc409d..1c143723b1c0d1 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -167,7 +167,6 @@ async def setup_class(self): dev_ctrl = self.default_controller self.problems = [] - # TODO: Handle already commissioned devices and add argument to specify "let's do PASE" do_test_over_pase = self.user_params.get("use_pase_only", True) dump_device_composition_path: Optional[str] = self.user_params.get("dump_device_composition_path", None) @@ -213,7 +212,8 @@ async def setup_class(self): else: asserts.fail("Failed to find the DUT according to command line arguments.") else: - asserts.fail("TODO: Support testing on already commissioned devices") + # Using the already commissioned node + node_id = self.dut_node_id wildcard_read = (await dev_ctrl.Read(node_id, [()])) endpoints_tlv = wildcard_read.tlvAttributes diff --git a/src/python_testing/TC_IDM_1_2.py b/src/python_testing/TC_IDM_1_2.py new file mode 100644 index 00000000000000..7adb7eb11108fa --- /dev/null +++ b/src/python_testing/TC_IDM_1_2.py @@ -0,0 +1,285 @@ +# +# Copyright (c) 2023 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. +# + +import inspect +import logging +from dataclasses import dataclass + +import chip.clusters as Clusters +import chip.discovery as Discovery +from chip import ChipUtility +from chip.exceptions import ChipStackError +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + + +def get_all_cmds_for_cluster_id(cid: int) -> list[Clusters.ClusterObjects.ClusterCommand]: + cluster = Clusters.ClusterObjects.ALL_CLUSTERS[cid] + try: + return inspect.getmembers(cluster.Commands, inspect.isclass) + except AttributeError: + return [] + + +def client_cmd(cmd_class): + # Inspect returns all the classes, not just the ones we want, so use a try + # here incase we're inspecting a builtin class + try: + return cmd_class if cmd_class.is_client else None + except AttributeError: + return None + +# one of the steps in this test requires sending a command that requires a timed interaction +# without first sending the TimedRequest action +# OpenCommissioningWindow requires a timed invoke and is mandatory on servers, BUT, it's marked +# that way in the base class. We need a new, fake class that doesn't have that set + + +@dataclass +class FakeRevokeCommissioning(Clusters.AdministratorCommissioning.Commands.RevokeCommissioning): + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return False + + +class TC_IDM_1_2(MatterBaseTest): + + @async_test_body + async def test_TC_IDM_1_2(self): + self.print_step(0, "Commissioning - already done") + wildcard_descriptor = await self.default_controller.ReadAttribute(self.dut_node_id, [(Clusters.Descriptor)]) + endpoints = list(wildcard_descriptor.keys()) + endpoints.sort() + + self.print_step(1, "Send Invoke to unsupported endpoint") + # First non-existent endpoint is where the index and and endpoint number don't match + non_existent_endpoint = next(i for i, e in enumerate(endpoints + [None]) if i != e) + # General Commissioning cluster should be supported on all DUTs, so it will recognize this cluster and + # command, but it is sent on an unsupported endpoint + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=0, breadcrumb=1) + try: + await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=non_existent_endpoint, payload=cmd) + asserts.fail("Unexpected success return from sending command to unsupported endpoint") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedEndpoint, "Unexpected error returned from unsupported endpoint") + + self.print_step(2, "Send Invoke to unsupported cluster") + all_cluster_ids = list(Clusters.ClusterObjects.ALL_CLUSTERS.keys()) + unsupported_clusters: dict[int, list[int]] = {} + supported_clusters: dict[int, list[int]] = {} + for i in endpoints: + dut_ep_cluster_ids = wildcard_descriptor[i][Clusters.Descriptor][Clusters.Descriptor.Attributes.ServerList] + unsupported_clusters[i] = list(set(all_cluster_ids) - set(dut_ep_cluster_ids)) + supported_clusters[i] = set(dut_ep_cluster_ids) + + # This is really unlikely to happen on any real product, so we're going to assert here if we can't find anything + # since it's likely a test error + asserts.assert_true(any(unsupported_clusters[i] for i in endpoints), + "Unable to find any unsupported clusters on any endpoint") + asserts.assert_true(any(supported_clusters[i] for i in endpoints), "Unable to find supported clusters on any endpoint") + + sent = False + for i in endpoints: + if sent: + break + for cid in unsupported_clusters[i]: + cluster = Clusters.ClusterObjects.ALL_CLUSTERS[cid] + members = get_all_cmds_for_cluster_id(cid) + if not members: + continue + # just use the first command with default values + name, cmd = members[0] + logging.info(f'Sending {name} command to unsupported cluster {cluster} on endpoint {i}') + try: + await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=i, payload=cmd()) + asserts.fail("Unexpected success return from sending command to unsupported cluster") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedCluster, "Unexpected error returned from unsupported cluster") + sent = True + break + asserts.assert_true(sent, "Unable to find unsupported cluster with commands on any supported endpoint") + + self.print_step(3, "Send Invoke for unsupported command") + # First read all the supported commands by wildcard reading the AcceptedCommands attribute from all clusters + # We can't wildcard across clusters even if the attribute is the same, so we're going to go 1 by 1. + # Just go endpoint by endpoint so we can early exit (each supports different clusters) + # TODO: add option to make this a beefier test that does all the commands? + sent = False + for i in endpoints: + if sent: + break + for cid in supported_clusters[i]: + cluster = Clusters.ClusterObjects.ALL_CLUSTERS[cid] + logging.info(f'Checking cluster {cluster} ({cid}) on ep {i} for supported commands') + members = get_all_cmds_for_cluster_id(cid) + if not members: + continue + + dut_supported_ids = await self.read_single_attribute_check_success(cluster=cluster, endpoint=i, attribute=cluster.Attributes.AcceptedCommandList) + all_supported_cmds = list(filter(None, [client_cmd(x[1]) for x in members])) + all_supported_ids = [x.command_id for x in all_supported_cmds] + unsupported_commands = list(set(all_supported_ids) - set(dut_supported_ids)) + if not unsupported_commands: + continue + + # Let's just use the first unsupported command + id = unsupported_commands[0] + cmd = next(filter(lambda x: x.command_id == id, all_supported_cmds)) + try: + ret = await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=i, payload=cmd()) + asserts.fail(f'Unexpected success sending unsupported cmd {cmd} to {cluster} cluster on ep {i}') + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedCommand, "Unexpected error returned from unsupported command") + sent = True + break + + # It might actually be the case that all the supported clusters support all the commands. In that case, let's just put a warning. + # We could, in theory, send a command with a fully out of bounds command ID, but that's not supported by the controller + if not sent: + logging.warning("Unable to find a supported cluster with unsupported commands on any endpoint - SKIPPING") + + self.print_step(4, "Setup TH to have no privileges for a cluster, send Invoke") + # Setup the ACL + acl_only = Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, + authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, + subjects=[self.matter_test_config.controller_node_id], + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0, cluster=Clusters.AccessControl.id)]) + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(0, Clusters.AccessControl.Attributes.Acl([acl_only]))]) + asserts.assert_equal(result[0].Status, Status.Success, "ACL write failed") + + # For the unsupported access test, let's use a cluster that's known to be there and supports commands - general commissioning on EP0 + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=0, breadcrumb=1) + try: + await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=cmd) + asserts.fail("Unexpected success return when sending a command with no privileges") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedAccess, "Unexpected error returned") + + full_access = Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, + authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, + subjects=[self.matter_test_config.controller_node_id], + targets=[]) + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(0, Clusters.AccessControl.Attributes.Acl([full_access]))]) + asserts.assert_equal(result[0].Status, Status.Success, "ACL write failed") + + self.print_step(5, "setup TH with no accessing fabric and invoke command") + # The only way to have no accessing fabric is to have a PASE session and no added NOC + # KeySetRead - fabric scoped command, should not be accessible over PASE + # To get a PASE session, we need an open commissioning window + discriminator = self.matter_test_config.discriminators[0] + 1 + + params = self.default_controller.OpenCommissioningWindow( + nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=discriminator, option=1) + + # TH2 = new controller that's not connected over CASE + new_certificate_authority = self.certificate_authority_manager.NewCertificateAuthority() + new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=self.matter_test_config.fabric_id + 1) + TH2 = new_fabric_admin.NewController(nodeId=112233) + + devices = TH2.DiscoverCommissionableNodes( + filterType=Discovery.FilterType.LONG_DISCRIMINATOR, filter=discriminator, stopOnFirst=False) + # For some reason, the devices returned here aren't filtered, so filter ourselves + device = next(filter(lambda d: d.commissioningMode == 2 and d.longDiscriminator == discriminator, devices)) + for a in device.addresses: + try: + TH2.EstablishPASESessionIP(ipaddr=a, setupPinCode=params.setupPinCode, + nodeid=self.dut_node_id+1, port=device.port) + break + except ChipStackError: + continue + + try: + TH2.GetConnectedDeviceSync(nodeid=self.dut_node_id+1, allowPASE=True, timeoutMs=1000) + except TimeoutError: + asserts.fail("Unable to establish a PASE session to the device") + + try: + # Any group ID is fine since we'll fail before this + await TH2.SendCommand(nodeid=self.dut_node_id + 1, endpoint=0, payload=Clusters.GroupKeyManagement.Commands.KeySetRead(groupKeySetID=0x0001)) + asserts.fail("Incorrectly received a success response from a fabric-scoped command") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedAccess, "Incorrect error from fabric-sensitive read over PASE") + + # Cleanup - RevokeCommissioning so we can use ArmFailSafe etc. again. + await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=Clusters.AdministratorCommissioning.Commands.RevokeCommissioning(), timedRequestTimeoutMs=6000) + + self.print_step(6, "Send invoke request with requires a data response") + # ArmFailSafe sends a data response + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=900, breadcrumb=1) + ret = await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=cmd) + asserts.assert_true(type_matches(ret, Clusters.GeneralCommissioning.Commands.ArmFailSafeResponse), + "Unexpected response type from ArmFailSafe") + + self.print_step(7, "Send a command with suppress Response") + # NOTE: This is out of scope currently due to https://github.com/project-chip/connectedhomeip/issues/8043 + # We perform this step, but the DUT will likely incorrectly send a response + # Sending this command at least ensures the DUT doesn't crash with this flag set, even if the behvaior is not correct + + # Lucky candidate ArmFailSafe is at it again - command side effect is to set breadcrumb attribute + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=900, breadcrumb=2) + await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=cmd, suppressResponse=True) + # TODO: Once the above issue is resolved, this needs a check to ensure that no response was received. + + # Verify that the command had the correct side effect even if a response was sent + breadcrumb = await self.read_single_attribute_check_success( + cluster=Clusters.GeneralCommissioning, attribute=Clusters.GeneralCommissioning.Attributes.Breadcrumb, endpoint=0) + asserts.assert_equal(breadcrumb, 2, "Breadcrumb was not correctly set on ArmFailSafe with response suppressed") + + # Cleanup - Unset the failsafe + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=0, breadcrumb=0) + await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=cmd) + + self.print_step(8, "Send Invoke with timedRequest marked, but no timed request sent") + # We can do this with any command, but to be thorough, test first with a command that does not + # require a timed interaction (ArmFailSafe) and then one that does (RevokeCommissioning) + try: + await self.default_controller.TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke(nodeid=self.dut_node_id, endpoint=0, payload=cmd) + asserts.fail("Unexpected success response from sending an Invoke with TimedRequest flag and no timed interaction") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedAccess, + "Unexpected error response from Invoke with TimedRequest flag and no TimedInvoke") + + # Try with RevokeCommissioning + # First open a commissioning window for us to revoke, so we know this command is able to succeed absent this error + _ = self.default_controller.OpenCommissioningWindow( + nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=1234, option=1) + cmd = FakeRevokeCommissioning() + try: + await self.default_controller.TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke(nodeid=self.dut_node_id, endpoint=0, payload=cmd) + asserts.fail("Unexpected success response from sending an Invoke with TimedRequest flag and no timed interaction") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.UnsupportedAccess, + "Unexpected error response from Invoke with TimedRequest flag and no TimedInvoke") + + self.print_step(9, "Send invoke for a command that requires timedRequest, but doesn't use one") + # RevokeCommissioning requires a timed interaction. This is enforced in the python layer because + # the generated class indicates that a timed interaction is required. The fake class overrides this. + try: + await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=cmd) + asserts.fail("Incorrectly received a success response for a command that required TimedInvoke action") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.NeedsTimedInteraction) + + # Cleanup - actually revoke commissioning to close the open window + await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=Clusters.AdministratorCommissioning.Commands.RevokeCommissioning(), timedRequestTimeoutMs=6000) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_TIMESYNC_2_2.py b/src/python_testing/TC_TIMESYNC_2_2.py index 0a92f1c47fcf05..72b9d0978e65f3 100644 --- a/src/python_testing/TC_TIMESYNC_2_2.py +++ b/src/python_testing/TC_TIMESYNC_2_2.py @@ -32,7 +32,8 @@ async def read_ts_attribute_expect_success(self, endpoint, attribute): @async_test_body async def test_TC_TIMESYNC_2_2(self): - endpoint = self.user_params.get("endpoint", 0) + # Time sync is required to be on endpoint 0 if it is present + endpoint = 0 time_cluster = Clusters.Objects.TimeSynchronization diff --git a/src/python_testing/TC_TIMESYNC_2_4.py b/src/python_testing/TC_TIMESYNC_2_4.py index a66ecc33599d91..b6b9644fd52719 100644 --- a/src/python_testing/TC_TIMESYNC_2_4.py +++ b/src/python_testing/TC_TIMESYNC_2_4.py @@ -46,7 +46,8 @@ async def send_set_time_zone_cmd_expect_error(self, tz: typing.List[Clusters.Obj @async_test_body async def test_TC_TIMESYNC_2_4(self): - self.endpoint = self.user_params.get("endpoint", 0) + # Time sync is required to be on endpoint 0 if it is present + self.endpoint = 0 time_cluster = Clusters.Objects.TimeSynchronization tz_struct = time_cluster.Structs.TimeZoneStruct diff --git a/src/python_testing/TC_TIMESYNC_2_5.py b/src/python_testing/TC_TIMESYNC_2_5.py index 3b2f62ce8d2810..683009c88733f7 100644 --- a/src/python_testing/TC_TIMESYNC_2_5.py +++ b/src/python_testing/TC_TIMESYNC_2_5.py @@ -43,7 +43,8 @@ async def send_set_dst_cmd_expect_error(self, dst: typing.List[Clusters.Objects. @async_test_body async def test_TC_TIMESYNC_2_5(self): - self.endpoint = self.user_params.get("endpoint", 0) + # Time sync is required to be on endpoint 0 if it is present + self.endpoint = 0 time_cluster = Clusters.Objects.TimeSynchronization dst_struct = time_cluster.Structs.DSTOffsetStruct diff --git a/src/python_testing/TC_TIMESYNC_2_6.py b/src/python_testing/TC_TIMESYNC_2_6.py index 2c12ed803ce221..23ed1a5575b6dd 100644 --- a/src/python_testing/TC_TIMESYNC_2_6.py +++ b/src/python_testing/TC_TIMESYNC_2_6.py @@ -43,7 +43,8 @@ async def send_set_default_ntp_cmd_expect_error(self, ntp: typing.Union[Nullable @async_test_body async def test_TC_TIMESYNC_2_6(self): - self.endpoint = self.user_params.get("endpoint", 0) + # Time sync is required to be on endpoint 0 if it is present + self.endpoint = 0 self.print_step(0, "Commissioning, already done") attributes = Clusters.TimeSynchronization.Attributes diff --git a/src/python_testing/TC_TIMESYNC_2_7.py b/src/python_testing/TC_TIMESYNC_2_7.py index 1aab7f9c126b66..8af89465bd3e5a 100644 --- a/src/python_testing/TC_TIMESYNC_2_7.py +++ b/src/python_testing/TC_TIMESYNC_2_7.py @@ -49,7 +49,8 @@ async def send_set_utc_cmd(self, utc: uint) -> None: @async_test_body async def test_TC_TIMESYNC_2_7(self): - self.endpoint = self.user_params.get("endpoint", 0) + # Time sync is required to be on endpoint 0 if it is present + self.endpoint = 0 self.print_step(0, "Commissioning, already done") time_cluster = Clusters.Objects.TimeSynchronization @@ -108,6 +109,8 @@ async def test_TC_TIMESYNC_2_7(self): if tz_list_size > 1: th_utc = utc_time_in_matter_epoch() tz = [tz_struct(offset=3600, validAt=0), tz_struct(offset=7200, validAt=th_utc+1e+7)] + ret = await self.send_set_time_zone_cmd(tz) + asserts.assert_true(ret.DSTOffsetRequired, "DSTOffsetRequired not set to true") self.print_step(12, "Send SetDSTOffset command") if tz_list_size > 1: diff --git a/src/python_testing/TC_TIMESYNC_2_8.py b/src/python_testing/TC_TIMESYNC_2_8.py index 589cc61b381752..ce5ed2b4ec307c 100644 --- a/src/python_testing/TC_TIMESYNC_2_8.py +++ b/src/python_testing/TC_TIMESYNC_2_8.py @@ -49,7 +49,8 @@ async def send_set_utc_cmd(self, utc: uint) -> None: @async_test_body async def test_TC_TIMESYNC_2_8(self): - self.endpoint = self.user_params.get("endpoint", 0) + # Time sync is required to be on endpoint 0 if it is present + self.endpoint = 0 self.print_step(0, "Commissioning, already done") time_cluster = Clusters.Objects.TimeSynchronization @@ -106,10 +107,9 @@ async def test_TC_TIMESYNC_2_8(self): self.print_step(11, "Read LocalTime") local = await self.read_ts_attribute_expect_success(local_attr) - compare_time(received=local, offset=timedelta(), tolerance=timedelta(seconds=5)) + asserts.assert_equal(local, NullValue, "LocalTime cannot be calculated since DST is empty") self.print_step(12, "Send SetDSTOffset command") - th_utc = utc_time_in_matter_epoch() dst = [dst_struct(offset=3600, validStarting=0, validUntil=NullValue)] await self.send_set_dst_cmd(dst) @@ -164,11 +164,10 @@ async def test_TC_TIMESYNC_2_8(self): self.print_step(24, "Read LocalTime") if dst_list_size > 1: local = await self.read_ts_attribute_expect_success(local_attr) - compare_time(received=local, offset=timedelta(), tolerance=timedelta(seconds=5)) + asserts.assert_equal(local, NullValue, "LocalTime cannot be calculated since DST is empty") self.print_step(25, "Send SetDSTOffset command") - th_utc = utc_time_in_matter_epoch() - dst = [dst_struct(offset=3600, validStarting=0, validUntil=NullValue)] + dst = [dst_struct(offset=-3600, validStarting=0, validUntil=NullValue)] await self.send_set_dst_cmd(dst) self.print_step(26, "Read LocalTime") @@ -176,7 +175,6 @@ async def test_TC_TIMESYNC_2_8(self): compare_time(received=local, offset=timedelta(seconds=-3600), tolerance=timedelta(seconds=5)) self.print_step(27, "Send SetDSTOffset command") - th_utc = utc_time_in_matter_epoch() dst = [dst_struct(offset=0, validStarting=0, validUntil=NullValue)] await self.send_set_dst_cmd(dst) diff --git a/src/python_testing/TC_TIMESYNC_2_9.py b/src/python_testing/TC_TIMESYNC_2_9.py index 77857c195540f0..a1d10d4c9616cc 100644 --- a/src/python_testing/TC_TIMESYNC_2_9.py +++ b/src/python_testing/TC_TIMESYNC_2_9.py @@ -48,7 +48,8 @@ async def send_set_utc_cmd(self, utc: uint) -> None: @async_test_body async def test_TC_TIMESYNC_2_9(self): - self.endpoint = self.user_params.get("endpoint", 0) + # Time sync is required to be on endpoint 0 if it is present + self.endpoint = 0 self.print_step(0, "Commissioning, already done") time_cluster = Clusters.Objects.TimeSynchronization diff --git a/src/python_testing/TC_TIMESYNC_3_1.py b/src/python_testing/TC_TIMESYNC_3_1.py new file mode 100644 index 00000000000000..f05730e58dcad0 --- /dev/null +++ b/src/python_testing/TC_TIMESYNC_3_1.py @@ -0,0 +1,48 @@ +# +# Copyright (c) 2023 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. +# + +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_TIMESYNC_3_1(MatterBaseTest): + + @async_test_body + async def test_TC_TIMESYNC_3_1(self): + self.print_step(1, "Wildcard read of time sync cluster") + utc_time_attr = Clusters.TimeSynchronization.Attributes.UTCTime + ret = await self.default_controller.ReadAttribute(nodeid=self.dut_node_id, attributes=[(utc_time_attr)]) + asserts.assert_equal(len(ret.keys()), 1, 'More than one time cluster found on the node') + asserts.assert_equal(next(iter(ret)), 0, 'Time cluster found on non-root endpoint') + + self.print_step(2, "Wildcard read of descriptor cluster") + server_list_attr = Clusters.Descriptor.Attributes.ServerList + ret = await self.default_controller.ReadAttribute(nodeid=self.dut_node_id, attributes=[(server_list_attr)]) + print(ret) + for endpoint, servers in ret.items(): + server_list = servers[Clusters.Descriptor][Clusters.Descriptor.Attributes.ServerList] + if endpoint == 0: + asserts.assert_true(Clusters.TimeSynchronization.id in server_list, + 'Time cluster id is not listed in server list for root endpoint') + else: + asserts.assert_false(Clusters.TimeSynchronization.id in server_list, + f'Time cluster id is incorrectly listed in the server list for ep {endpoint}') + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/test_driver/linux-cirque/CommissioningFailureOnReportTest.py b/src/test_driver/linux-cirque/CommissioningFailureOnReportTest.py index b4c346bf3e45eb..877e141e588cd6 100755 --- a/src/test_driver/linux-cirque/CommissioningFailureOnReportTest.py +++ b/src/test_driver/linux-cirque/CommissioningFailureOnReportTest.py @@ -42,7 +42,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -51,7 +51,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/CommissioningFailureTest.py b/src/test_driver/linux-cirque/CommissioningFailureTest.py index dbb8dfebc09838..e56f396f2668f4 100755 --- a/src/test_driver/linux-cirque/CommissioningFailureTest.py +++ b/src/test_driver/linux-cirque/CommissioningFailureTest.py @@ -42,7 +42,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -51,7 +51,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/CommissioningTest.py b/src/test_driver/linux-cirque/CommissioningTest.py index adc6c21656dc53..6b6a93b9cd245b 100755 --- a/src/test_driver/linux-cirque/CommissioningTest.py +++ b/src/test_driver/linux-cirque/CommissioningTest.py @@ -43,7 +43,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -52,7 +52,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -61,7 +61,7 @@ }, 'device2': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/CommissioningWindowTest.py b/src/test_driver/linux-cirque/CommissioningWindowTest.py index 7c1a646c58c52e..a984da8db62db4 100755 --- a/src/test_driver/linux-cirque/CommissioningWindowTest.py +++ b/src/test_driver/linux-cirque/CommissioningWindowTest.py @@ -43,7 +43,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -52,7 +52,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/EchoOverTcpTest.py b/src/test_driver/linux-cirque/EchoOverTcpTest.py index b5a3a2471a9e48..98afc41f447c33 100755 --- a/src/test_driver/linux-cirque/EchoOverTcpTest.py +++ b/src/test_driver/linux-cirque/EchoOverTcpTest.py @@ -36,7 +36,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'CHIP-Echo-Requester', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -45,7 +45,7 @@ }, 'device1': { 'type': 'CHIP-Echo-Responder', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/EchoTest.py b/src/test_driver/linux-cirque/EchoTest.py index b76812dbf3aa4f..a144be49c7b79a 100755 --- a/src/test_driver/linux-cirque/EchoTest.py +++ b/src/test_driver/linux-cirque/EchoTest.py @@ -36,7 +36,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'CHIP-Echo-Requester', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -45,7 +45,7 @@ }, 'device1': { 'type': 'CHIP-Echo-Responder', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/FailsafeTest.py b/src/test_driver/linux-cirque/FailsafeTest.py index 3f75873cd5d683..98d11d69f61ea2 100755 --- a/src/test_driver/linux-cirque/FailsafeTest.py +++ b/src/test_driver/linux-cirque/FailsafeTest.py @@ -42,7 +42,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -51,7 +51,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/InteractionModelTest.py b/src/test_driver/linux-cirque/InteractionModelTest.py index 3884f0a125cd36..1d8ad29f6cab77 100755 --- a/src/test_driver/linux-cirque/InteractionModelTest.py +++ b/src/test_driver/linux-cirque/InteractionModelTest.py @@ -36,7 +36,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'CHIP-IM-Initiator', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -45,7 +45,7 @@ }, 'device1': { 'type': 'CHIP-IM-Responder', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/MobileDeviceTest.py b/src/test_driver/linux-cirque/MobileDeviceTest.py index 641b32d14ff544..508e636cb4f197 100755 --- a/src/test_driver/linux-cirque/MobileDeviceTest.py +++ b/src/test_driver/linux-cirque/MobileDeviceTest.py @@ -42,7 +42,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -51,7 +51,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/OnOffClusterTest.py b/src/test_driver/linux-cirque/OnOffClusterTest.py index 0bd78f2c8a5246..c2281059646b94 100755 --- a/src/test_driver/linux-cirque/OnOffClusterTest.py +++ b/src/test_driver/linux-cirque/OnOffClusterTest.py @@ -42,14 +42,14 @@ DEVICE_CONFIG = { 'device0': { 'type': 'CHIP-Server', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'Interactive', 'Mount'], 'rcp_mode': True, "mount_pairs": [[CHIP_REPO, CHIP_REPO]], }, 'device1': { 'type': 'CHIP-Tool', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'Interactive', 'Mount'], 'rcp_mode': True, "mount_pairs": [[CHIP_REPO, CHIP_REPO]], diff --git a/src/test_driver/linux-cirque/PythonCommissioningTest.py b/src/test_driver/linux-cirque/PythonCommissioningTest.py index c3f70c85760bac..ff8814368345ff 100755 --- a/src/test_driver/linux-cirque/PythonCommissioningTest.py +++ b/src/test_driver/linux-cirque/PythonCommissioningTest.py @@ -43,7 +43,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -52,7 +52,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -61,7 +61,7 @@ }, 'device2': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/README.md b/src/test_driver/linux-cirque/README.md index 11d2ce28f375df..051c2618f22a1d 100644 --- a/src/test_driver/linux-cirque/README.md +++ b/src/test_driver/linux-cirque/README.md @@ -16,7 +16,7 @@ If you don't want cirque break your local environment, you can enter a environment insider docker ``` -integrations/docker/images/chip-build-cirque/run.sh --privileged --volume /dev/pts:/dev/pts --volume /tmp:/tmp -it -- bash +integrations/docker/images/stage-2/chip-build-cirque/run.sh --privileged --volume /dev/pts:/dev/pts --volume /tmp:/tmp -it -- bash ``` ## Setting up cirque environment @@ -32,8 +32,8 @@ It will: 1. Install necessary packages required by cirque, -2. Build `connectedhomeip/chip-cirque-device-base:latest` docker image for - running devices, +2. Build `project-chip/chip-cirque-device-base:latest` docker image for running + devices, 3. Build openthread for simulating thread network. diff --git a/src/test_driver/linux-cirque/SplitCommissioningTest.py b/src/test_driver/linux-cirque/SplitCommissioningTest.py index ad4475fd92437d..78a08e82ec4989 100755 --- a/src/test_driver/linux-cirque/SplitCommissioningTest.py +++ b/src/test_driver/linux-cirque/SplitCommissioningTest.py @@ -41,7 +41,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -50,7 +50,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -59,7 +59,7 @@ }, 'device2': { 'type': 'CHIPEndDevice', - 'base_image': 'connectedhomeip/chip-cirque-device-base', + 'base_image': 'project-chip/chip-cirque-device-base', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/topologies/one_node_one_android.json b/src/test_driver/linux-cirque/topologies/one_node_one_android.json index d7fbdeb3e83876..3b8abea4b9548f 100644 --- a/src/test_driver/linux-cirque/topologies/one_node_one_android.json +++ b/src/test_driver/linux-cirque/topologies/one_node_one_android.json @@ -1,7 +1,7 @@ { "device0": { "type": "CHIP-00", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true diff --git a/src/test_driver/linux-cirque/topologies/three_node_with_ipv6.json b/src/test_driver/linux-cirque/topologies/three_node_with_ipv6.json index 251f3c30604c4f..f97eede81b18df 100644 --- a/src/test_driver/linux-cirque/topologies/three_node_with_ipv6.json +++ b/src/test_driver/linux-cirque/topologies/three_node_with_ipv6.json @@ -1,21 +1,21 @@ { "device0": { "type": "CHIP-00", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "docker_network": "Ipv6", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] }, "device1": { "type": "CHIP-01", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "docker_network": "Ipv6", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] }, "device2": { "type": "CHIP-02", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "docker_network": "Ipv6", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] diff --git a/src/test_driver/linux-cirque/topologies/three_node_with_ipvlan.json b/src/test_driver/linux-cirque/topologies/three_node_with_ipvlan.json index c16b4f10f2e292..54c07d4f46ec4e 100644 --- a/src/test_driver/linux-cirque/topologies/three_node_with_ipvlan.json +++ b/src/test_driver/linux-cirque/topologies/three_node_with_ipvlan.json @@ -1,21 +1,21 @@ { "device0": { "type": "CHIP-00", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "docker_network": "IpvLan", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] }, "device1": { "type": "CHIP-01", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "docker_network": "IpvLan", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] }, "device2": { "type": "CHIP-02", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "docker_network": "IpvLan", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] diff --git a/src/test_driver/linux-cirque/topologies/three_node_with_thread.json b/src/test_driver/linux-cirque/topologies/three_node_with_thread.json index d6892d22942d4c..0b9696e12bcefb 100644 --- a/src/test_driver/linux-cirque/topologies/three_node_with_thread.json +++ b/src/test_driver/linux-cirque/topologies/three_node_with_thread.json @@ -1,21 +1,21 @@ { "device0": { "type": "CHIP-00", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true }, "device1": { "type": "CHIP-01", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true }, "device2": { "type": "CHIP-02", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true diff --git a/src/test_driver/linux-cirque/topologies/two_node_with_thread.json b/src/test_driver/linux-cirque/topologies/two_node_with_thread.json index 15021c4add5177..4da678ec784031 100644 --- a/src/test_driver/linux-cirque/topologies/two_node_with_thread.json +++ b/src/test_driver/linux-cirque/topologies/two_node_with_thread.json @@ -1,14 +1,14 @@ { "device0": { "type": "CHIP-00", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true }, "device1": { "type": "CHIP-01", - "base_image": "connectedhomeip/chip-cirque-device-base", + "base_image": "project-chip/chip-cirque-device-base", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true diff --git a/src/test_driver/tizen/README.md b/src/test_driver/tizen/README.md index 85a91563183b42..fc815d85f081aa 100644 --- a/src/test_driver/tizen/README.md +++ b/src/test_driver/tizen/README.md @@ -12,7 +12,7 @@ image from hub.docker.com or build it locally using the provided Dockerfile in ```sh # Pull the image from hub.docker.com -docker pull connectedhomeip/chip-build-tizen-qemu:latest +docker pull ghcr.io/project-chip/chip-build-tizen-qemu:latest ``` ## Building and Running Tests on QEMU @@ -21,7 +21,7 @@ All steps described below should be done inside the docker container. ```sh docker run -it --rm --name chip-tizen-qemu \ - connectedhomeip/chip-build-tizen-qemu:latest /bin/bash + ghcr.io/project-chip/chip-build-tizen-qemu:latest /bin/bash ``` ### Clone the connectedhomeip repository diff --git a/third_party/bouffalolab/bl702/bl_iot_sdk.gni b/third_party/bouffalolab/bl702/bl_iot_sdk.gni index 6d3bdcb825eb08..8b69f1b2941cc4 100644 --- a/third_party/bouffalolab/bl702/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl702/bl_iot_sdk.gni @@ -542,7 +542,9 @@ template("bl_iot_sdk") { "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/platform_util.c", "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/sha256.c", "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/sha512.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509.c", "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509_create.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509_crt.c", "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509write_csr.c", ] diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index b18d45f042555d..4e73afe6ed21ed 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit b18d45f042555dc79e5c0e2e0f8f73eb3a61677e +Subproject commit 4e73afe6ed21edfc03057f2c97d541b57d0d01e9 diff --git a/third_party/openthread/repo b/third_party/openthread/repo index 8bc25042ba5cde..f7690fe7e9d638 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit 8bc25042ba5cde20605eec2a329c0dff575303f4 +Subproject commit f7690fe7e9d638341921808cba6a3e695ec0131e diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index de1f70f42c5ce2..11aa2d0e651ed6 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -212,6 +212,7 @@ template("efr32_sdk") { "PLAT=EMBER_PLATFORM_CORTEXM3", "${silabs_mcu}=1", "${silabs_board}=1", + "SL_BOARD_NAME=${silabs_board}", "SL_SUPRESS_DEPRECATION_WARNINGS_SDK_3_1", "__HEAP_SIZE=0", "SL_CATALOG_FREERTOS_KERNEL_PRESENT=1", 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 7ad0dbf9987cf0..750e3abf7faa20 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 @@ -9479,112 +9479,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace OperationalState { namespace Attributes { -namespace CurrentPhase { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_INT8U_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 CurrentPhase - -namespace CountdownTime { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_ELAPSED_S_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 CountdownTime - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) @@ -9653,112 +9547,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace RvcOperationalState { namespace Attributes { -namespace CurrentPhase { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_INT8U_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 CurrentPhase - -namespace CountdownTime { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_ELAPSED_S_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 CountdownTime - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) @@ -9827,42 +9615,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace HepaFilterMonitoring { namespace Attributes { -namespace Condition { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); -} - -} // namespace Condition - -namespace DegradationDirection { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); @@ -9874,9 +9631,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMoni *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9884,16 +9641,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMoni Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace DegradationDirection +} // namespace FeatureMap -namespace ChangeIndication { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); @@ -9905,9 +9662,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMoni *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9915,345 +9672,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMoni Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ChangeIndication +} // namespace ClusterRevision -namespace InPlaceIndicator { - -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, bool value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); -} - -} // namespace InPlaceIndicator - -namespace LastChangedTime { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_EPOCH_S_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 LastChangedTime - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace HepaFilterMonitoring +} // namespace Attributes +} // namespace HepaFilterMonitoring namespace ActivatedCarbonFilterMonitoring { namespace Attributes { -namespace Condition { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); -} - -} // namespace Condition - -namespace DegradationDirection { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace DegradationDirection - -namespace ChangeIndication { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace ChangeIndication - -namespace InPlaceIndicator { - -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, bool value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); -} - -} // namespace InPlaceIndicator - -namespace LastChangedTime { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_EPOCH_S_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 LastChangedTime - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) 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 26b45a6b13c3f9..4e5bc2afab910a 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 @@ -1785,20 +1785,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace OperationalState { namespace Attributes { -namespace CurrentPhase { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace CurrentPhase - -namespace CountdownTime { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace CountdownTime - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -1815,20 +1801,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace RvcOperationalState { namespace Attributes { -namespace CurrentPhase { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace CurrentPhase - -namespace CountdownTime { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace CountdownTime - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -1845,35 +1817,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace HepaFilterMonitoring { namespace Attributes { -namespace Condition { -EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value); // percent -EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); -} // namespace Condition - -namespace DegradationDirection { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum * value); // DegradationDirectionEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value); -} // namespace DegradationDirection - -namespace ChangeIndication { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum * value); // ChangeIndicationEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value); -} // namespace ChangeIndication - -namespace InPlaceIndicator { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean -EmberAfStatus Set(chip::EndpointId endpoint, bool value); -} // namespace InPlaceIndicator - -namespace LastChangedTime { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace LastChangedTime - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -1890,36 +1833,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace ActivatedCarbonFilterMonitoring { namespace Attributes { -namespace Condition { -EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value); // percent -EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); -} // namespace Condition - -namespace DegradationDirection { -EmberAfStatus -Get(chip::EndpointId endpoint, - chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum * value); // DegradationDirectionEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value); -} // namespace DegradationDirection - -namespace ChangeIndication { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum * value); // ChangeIndicationEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value); -} // namespace ChangeIndication - -namespace InPlaceIndicator { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean -EmberAfStatus Set(chip::EndpointId endpoint, bool value); -} // namespace InPlaceIndicator - -namespace LastChangedTime { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace LastChangedTime - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); 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 e71de4f5854f5e..87d059d6c65623 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -11855,30 +11855,6 @@ bool emberAfDishwasherAlarmClusterResetCallback( bool emberAfDishwasherAlarmClusterModifyEnabledAlarmsCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::DecodableType & commandData); -/** - * @brief Operational State Cluster Pause Command callback (from client) - */ -bool emberAfOperationalStateClusterPauseCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OperationalState::Commands::Pause::DecodableType & commandData); -/** - * @brief Operational State Cluster Stop Command callback (from client) - */ -bool emberAfOperationalStateClusterStopCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OperationalState::Commands::Stop::DecodableType & commandData); -/** - * @brief Operational State Cluster Start Command callback (from client) - */ -bool emberAfOperationalStateClusterStartCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OperationalState::Commands::Start::DecodableType & commandData); -/** - * @brief Operational State Cluster Resume Command callback (from client) - */ -bool emberAfOperationalStateClusterResumeCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OperationalState::Commands::Resume::DecodableType & commandData); /** * @brief RVC Operational State Cluster Pause Command callback (from client) */ @@ -11903,18 +11879,6 @@ bool emberAfRvcOperationalStateClusterStartCallback( bool emberAfRvcOperationalStateClusterResumeCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::RvcOperationalState::Commands::Resume::DecodableType & commandData); -/** - * @brief HEPA Filter Monitoring Cluster ResetCondition Command callback (from client) - */ -bool emberAfHepaFilterMonitoringClusterResetConditionCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::DecodableType & commandData); -/** - * @brief Activated Carbon Filter Monitoring Cluster ResetCondition Command callback (from client) - */ -bool emberAfActivatedCarbonFilterMonitoringClusterResetConditionCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::DecodableType & commandData); /** * @brief Ceramic Filter Monitoring Cluster ResetCondition Command callback (from client) */ 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 5689c94797d43d..9d5db896be6098 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 @@ -305,12 +305,12 @@ namespace Identify { namespace Commands { namespace Identify { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIdentifyTime), identifyTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIdentifyTime), identifyTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -342,13 +342,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Identify. namespace TriggerEffect { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEffectIdentifier), effectIdentifier)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEffectVariant), effectVariant)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEffectIdentifier), effectIdentifier)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEffectVariant), effectVariant)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -428,13 +428,13 @@ namespace Groups { namespace Commands { namespace AddGroup { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupName), groupName)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupName), groupName)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -469,13 +469,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AddGroup. namespace AddGroupResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -510,12 +510,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AddGroupResponse. namespace ViewGroup { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -547,14 +547,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ViewGroup. namespace ViewGroupResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupName), groupName)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupName), groupName)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -592,12 +592,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ViewGroupResponse. namespace GetGroupMembership { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupList), groupList)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupList), groupList)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -629,13 +629,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetGroupMembership. namespace GetGroupMembershipResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCapacity), capacity)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupList), groupList)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCapacity), capacity)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupList), groupList)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -670,12 +670,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetGroupMembershipResponse. namespace RemoveGroup { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -707,13 +707,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveGroup. namespace RemoveGroupResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -748,11 +748,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveGroupResponse. namespace RemoveAllGroups { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -781,13 +781,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveAllGroups. namespace AddGroupIfIdentifying { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupName), groupName)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupName), groupName)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -954,16 +954,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace AddScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneName), sceneName)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kExtensionFieldSets), extensionFieldSets)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneName), sceneName)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kExtensionFieldSets), extensionFieldSets)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1007,14 +1007,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AddScene. namespace AddSceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1052,13 +1052,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AddSceneResponse. namespace ViewScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1093,17 +1093,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ViewScene. namespace ViewSceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneName), sceneName)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kExtensionFieldSets), extensionFieldSets)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneName), sceneName)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kExtensionFieldSets), extensionFieldSets)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1150,13 +1150,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ViewSceneResponse. namespace RemoveScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1191,14 +1191,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveScene. namespace RemoveSceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1236,12 +1236,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveSceneResponse. namespace RemoveAllScenes { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1273,13 +1273,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveAllScenes. namespace RemoveAllScenesResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1314,13 +1314,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveAllScenesResponse. namespace StoreScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1355,14 +1355,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StoreScene. namespace StoreSceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1400,14 +1400,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StoreSceneResponse. namespace RecallScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1445,12 +1445,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RecallScene. namespace GetSceneMembership { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1482,15 +1482,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetSceneMembership. namespace GetSceneMembershipResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCapacity), capacity)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneList), sceneList)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCapacity), capacity)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneList), sceneList)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1531,16 +1531,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetSceneMembershipResponse. namespace EnhancedAddScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneName), sceneName)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kExtensionFieldSets), extensionFieldSets)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneName), sceneName)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kExtensionFieldSets), extensionFieldSets)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1584,14 +1584,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnhancedAddScene. namespace EnhancedAddSceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1629,13 +1629,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnhancedAddSceneResponse. namespace EnhancedViewScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1670,17 +1670,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnhancedViewScene. namespace EnhancedViewSceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupID), groupID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneID), sceneID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneName), sceneName)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kExtensionFieldSets), extensionFieldSets)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupID), groupID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneID), sceneID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneName), sceneName)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kExtensionFieldSets), extensionFieldSets)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1727,16 +1727,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnhancedViewSceneResponse. namespace CopyScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMode), mode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupIdentifierFrom), groupIdentifierFrom)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneIdentifierFrom), sceneIdentifierFrom)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupIdentifierTo), groupIdentifierTo)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneIdentifierTo), sceneIdentifierTo)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMode), mode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupIdentifierFrom), groupIdentifierFrom)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneIdentifierFrom), sceneIdentifierFrom)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupIdentifierTo), groupIdentifierTo)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneIdentifierTo), sceneIdentifierTo)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1780,14 +1780,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace CopyScene. namespace CopySceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupIdentifierFrom), groupIdentifierFrom)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSceneIdentifierFrom), sceneIdentifierFrom)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupIdentifierFrom), groupIdentifierFrom)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSceneIdentifierFrom), sceneIdentifierFrom)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1888,11 +1888,11 @@ namespace OnOff { namespace Commands { namespace Off { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1921,11 +1921,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Off. namespace On { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1954,11 +1954,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace On. namespace Toggle { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1987,13 +1987,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Toggle. namespace OffWithEffect { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEffectIdentifier), effectIdentifier)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEffectVariant), effectVariant)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEffectIdentifier), effectIdentifier)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEffectVariant), effectVariant)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2028,11 +2028,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace OffWithEffect. namespace OnWithRecallGlobalScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2061,14 +2061,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace OnWithRecallGlobalScene. namespace OnWithTimedOff { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOnOffControl), onOffControl)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOnTime), onTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOffWaitTime), offWaitTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOnOffControl), onOffControl)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOnTime), onTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOffWaitTime), offWaitTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2204,15 +2204,15 @@ namespace LevelControl { namespace Commands { namespace MoveToLevel { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLevel), level)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLevel), level)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2253,15 +2253,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveToLevel. namespace Move { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMoveMode), moveMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRate), rate)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMoveMode), moveMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRate), rate)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2302,16 +2302,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Move. namespace Step { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepMode), stepMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepSize), stepSize)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepMode), stepMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepSize), stepSize)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2355,13 +2355,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Step. namespace Stop { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2396,15 +2396,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Stop. namespace MoveToLevelWithOnOff { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLevel), level)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLevel), level)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2445,15 +2445,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveToLevelWithOnOff. namespace MoveWithOnOff { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMoveMode), moveMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRate), rate)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMoveMode), moveMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRate), rate)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2494,16 +2494,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveWithOnOff. namespace StepWithOnOff { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepMode), stepMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepSize), stepSize)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepMode), stepMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepSize), stepSize)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2547,13 +2547,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StepWithOnOff. namespace StopWithOnOff { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -2588,12 +2588,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StopWithOnOff. namespace MoveToClosestFrequency { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFrequency), frequency)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFrequency), frequency)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3258,16 +3258,16 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace AccessControlEntryChanged { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAdminNodeID), adminNodeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAdminPasscodeID), adminPasscodeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kChangeType), changeType)); - ReturnErrorOnFailure(DataModel::EncodeForRead(writer, TLV::ContextTag(Fields::kLatestValue), GetFabricIndex(), latestValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminNodeID), adminNodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminPasscodeID), adminPasscodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kChangeType), changeType)); + ReturnErrorOnFailure(DataModel::EncodeForRead(aWriter, TLV::ContextTag(Fields::kLatestValue), GetFabricIndex(), latestValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3311,16 +3311,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AccessControlEntryChanged. namespace AccessControlExtensionChanged { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAdminNodeID), adminNodeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAdminPasscodeID), adminPasscodeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kChangeType), changeType)); - ReturnErrorOnFailure(DataModel::EncodeForRead(writer, TLV::ContextTag(Fields::kLatestValue), GetFabricIndex(), latestValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminNodeID), adminNodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminPasscodeID), adminPasscodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kChangeType), changeType)); + ReturnErrorOnFailure(DataModel::EncodeForRead(aWriter, TLV::ContextTag(Fields::kLatestValue), GetFabricIndex(), latestValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3484,13 +3484,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace InstantAction { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3525,14 +3525,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace InstantAction. namespace InstantActionWithTransition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3570,13 +3570,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace InstantActionWithTransition. namespace StartAction { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3611,14 +3611,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StartAction. namespace StartActionWithDuration { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDuration), duration)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDuration), duration)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3656,13 +3656,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StartActionWithDuration. namespace StopAction { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3697,13 +3697,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StopAction. namespace PauseAction { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3738,14 +3738,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace PauseAction. namespace PauseActionWithDuration { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDuration), duration)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDuration), duration)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3783,13 +3783,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace PauseActionWithDuration. namespace ResumeAction { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3824,13 +3824,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ResumeAction. namespace EnableAction { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3865,14 +3865,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnableAction. namespace EnableActionWithDuration { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDuration), duration)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDuration), duration)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3910,13 +3910,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnableActionWithDuration. namespace DisableAction { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -3951,14 +3951,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace DisableAction. namespace DisableActionWithDuration { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDuration), duration)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDuration), duration)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4039,14 +4039,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace StateChanged { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewState), newState)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4084,15 +4084,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StateChanged. namespace ActionFailed { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewState), newState)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kError), error)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kError), error)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4229,11 +4229,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace MfgSpecificPing { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4359,12 +4359,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace StartUp { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4396,11 +4396,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StartUp. namespace ShutDown { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4429,12 +4429,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ShutDown. namespace Leave { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4466,12 +4466,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Leave. namespace ReachableChanged { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kReachableNewValue), reachableNewValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReachableNewValue), reachableNewValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4509,19 +4509,19 @@ namespace OtaSoftwareUpdateProvider { namespace Commands { namespace QueryImage { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kVendorID), vendorID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProductID), productID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProtocolsSupported), protocolsSupported)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kHardwareVersion), hardwareVersion)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocation), location)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRequestorCanConsent), requestorCanConsent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMetadataForProvider), metadataForProvider)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kVendorID), vendorID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProductID), productID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProtocolsSupported), protocolsSupported)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kHardwareVersion), hardwareVersion)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocation), location)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRequestorCanConsent), requestorCanConsent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMetadataForProvider), metadataForProvider)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4574,19 +4574,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace QueryImage. namespace QueryImageResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDelayedActionTime), delayedActionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kImageURI), imageURI)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSoftwareVersionString), softwareVersionString)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUpdateToken), updateToken)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserConsentNeeded), userConsentNeeded)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMetadataForRequestor), metadataForRequestor)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDelayedActionTime), delayedActionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kImageURI), imageURI)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersionString), softwareVersionString)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUpdateToken), updateToken)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserConsentNeeded), userConsentNeeded)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMetadataForRequestor), metadataForRequestor)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4639,13 +4639,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace QueryImageResponse. namespace ApplyUpdateRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUpdateToken), updateToken)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewVersion), newVersion)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUpdateToken), updateToken)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewVersion), newVersion)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4680,13 +4680,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ApplyUpdateRequest. namespace ApplyUpdateResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAction), action)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDelayedActionTime), delayedActionTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAction), action)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDelayedActionTime), delayedActionTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4721,13 +4721,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ApplyUpdateResponse. namespace NotifyUpdateApplied { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUpdateToken), updateToken)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUpdateToken), updateToken)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4864,16 +4864,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace AnnounceOTAProvider { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProviderNodeID), providerNodeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kVendorID), vendorID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAnnouncementReason), announcementReason)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMetadataForNode), metadataForNode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEndpoint), endpoint)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProviderNodeID), providerNodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kVendorID), vendorID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAnnouncementReason), announcementReason)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMetadataForNode), metadataForNode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEndpoint), endpoint)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -4963,15 +4963,15 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace StateTransition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPreviousState), previousState)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewState), newState)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kReason), reason)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTargetSoftwareVersion), targetSoftwareVersion)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousState), previousState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReason), reason)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTargetSoftwareVersion), targetSoftwareVersion)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5012,13 +5012,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StateTransition. namespace VersionApplied { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProductID), productID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProductID), productID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5053,15 +5053,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace VersionApplied. namespace DownloadError { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBytesDownloaded), bytesDownloaded)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProgressPercent), progressPercent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPlatformCode), platformCode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBytesDownloaded), bytesDownloaded)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProgressPercent), progressPercent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPlatformCode), platformCode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5541,13 +5541,13 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace WiredFaultChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrevious), previous)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5582,13 +5582,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace WiredFaultChange. namespace BatFaultChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrevious), previous)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5623,13 +5623,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace BatFaultChange. namespace BatChargeFaultChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrevious), previous)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5718,13 +5718,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ArmFailSafe { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kExpiryLengthSeconds), expiryLengthSeconds)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kExpiryLengthSeconds), expiryLengthSeconds)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5759,13 +5759,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ArmFailSafe. namespace ArmFailSafeResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kErrorCode), errorCode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDebugText), debugText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorCode), errorCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDebugText), debugText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5800,14 +5800,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ArmFailSafeResponse. namespace SetRegulatoryConfig { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewRegulatoryConfig), newRegulatoryConfig)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCountryCode), countryCode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewRegulatoryConfig), newRegulatoryConfig)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCountryCode), countryCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5845,13 +5845,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetRegulatoryConfig. namespace SetRegulatoryConfigResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kErrorCode), errorCode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDebugText), debugText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorCode), errorCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDebugText), debugText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5886,11 +5886,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetRegulatoryConfigResponse. namespace CommissioningComplete { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -5919,13 +5919,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace CommissioningComplete. namespace CommissioningCompleteResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kErrorCode), errorCode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDebugText), debugText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorCode), errorCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDebugText), debugText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6188,13 +6188,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ScanNetworks { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSsid), ssid)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSsid), ssid)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6229,15 +6229,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ScanNetworks. namespace ScanNetworksResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNetworkingStatus), networkingStatus)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDebugText), debugText)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kWiFiScanResults), wiFiScanResults)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kThreadScanResults), threadScanResults)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNetworkingStatus), networkingStatus)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDebugText), debugText)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kWiFiScanResults), wiFiScanResults)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kThreadScanResults), threadScanResults)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6278,14 +6278,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ScanNetworksResponse. namespace AddOrUpdateWiFiNetwork { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSsid), ssid)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredentials), credentials)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSsid), ssid)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentials), credentials)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6323,13 +6323,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AddOrUpdateWiFiNetwork. namespace AddOrUpdateThreadNetwork { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperationalDataset), operationalDataset)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationalDataset), operationalDataset)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6364,13 +6364,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AddOrUpdateThreadNetwork. namespace RemoveNetwork { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNetworkID), networkID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNetworkID), networkID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6405,14 +6405,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveNetwork. namespace NetworkConfigResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNetworkingStatus), networkingStatus)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDebugText), debugText)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNetworkIndex), networkIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNetworkingStatus), networkingStatus)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDebugText), debugText)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNetworkIndex), networkIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6450,13 +6450,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace NetworkConfigResponse. namespace ConnectNetwork { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNetworkID), networkID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNetworkID), networkID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6491,14 +6491,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ConnectNetwork. namespace ConnectNetworkResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNetworkingStatus), networkingStatus)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDebugText), debugText)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kErrorValue), errorValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNetworkingStatus), networkingStatus)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDebugText), debugText)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorValue), errorValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6536,14 +6536,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ConnectNetworkResponse. namespace ReorderNetwork { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNetworkID), networkID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNetworkIndex), networkIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNetworkID), networkID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNetworkIndex), networkIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBreadcrumb), breadcrumb)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6644,14 +6644,14 @@ namespace DiagnosticLogs { namespace Commands { namespace RetrieveLogsRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIntent), intent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRequestedProtocol), requestedProtocol)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransferFileDesignator), transferFileDesignator)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIntent), intent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRequestedProtocol), requestedProtocol)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransferFileDesignator), transferFileDesignator)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6689,15 +6689,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RetrieveLogsRequest. namespace RetrieveLogsResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLogContent), logContent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUTCTimeStamp), UTCTimeStamp)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTimeSinceBoot), timeSinceBoot)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLogContent), logContent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUTCTimeStamp), UTCTimeStamp)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTimeSinceBoot), timeSinceBoot)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6849,13 +6849,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace TestEventTrigger { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEnableKey), enableKey)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEventTrigger), eventTrigger)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnableKey), enableKey)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEventTrigger), eventTrigger)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6951,13 +6951,13 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace HardwareFaultChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrevious), previous)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -6992,13 +6992,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace HardwareFaultChange. namespace RadioFaultChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrevious), previous)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -7033,13 +7033,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RadioFaultChange. namespace NetworkFaultChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrevious), previous)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -7074,12 +7074,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace NetworkFaultChange. namespace BootReason { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBootReason), bootReason)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBootReason), bootReason)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -7175,11 +7175,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetWatermarks { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -7254,14 +7254,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace SoftwareFault { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kId), id)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kName), name)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFaultRecording), faultRecording)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kId), id)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kName), name)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFaultRecording), faultRecording)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -7603,11 +7603,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCounts { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -7859,12 +7859,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace ConnectionStatus { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kConnectionStatus), connectionStatus)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kConnectionStatus), connectionStatus)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -7896,13 +7896,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ConnectionStatus. namespace NetworkFaultChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrevious), previous)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -7943,11 +7943,11 @@ namespace WiFiNetworkDiagnostics { namespace Commands { namespace ResetCounts { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8049,12 +8049,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace Disconnection { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kReasonCode), reasonCode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReasonCode), reasonCode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8086,13 +8086,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Disconnection. namespace AssociationFailure { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAssociationFailure), associationFailure)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAssociationFailure), associationFailure)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8127,12 +8127,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AssociationFailure. namespace ConnectionStatus { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kConnectionStatus), connectionStatus)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kConnectionStatus), connectionStatus)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8170,11 +8170,11 @@ namespace EthernetNetworkDiagnostics { namespace Commands { namespace ResetCounts { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8459,14 +8459,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace SetUTCTime { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUTCTime), UTCTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGranularity), granularity)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTimeSource), timeSource)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUTCTime), UTCTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGranularity), granularity)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTimeSource), timeSource)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8504,12 +8504,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetUTCTime. namespace SetTrustedTimeSource { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTrustedTimeSource), trustedTimeSource)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTrustedTimeSource), trustedTimeSource)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8541,12 +8541,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetTrustedTimeSource. namespace SetTimeZone { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTimeZone), timeZone)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTimeZone), timeZone)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8578,12 +8578,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetTimeZone. namespace SetTimeZoneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDSTOffsetRequired), DSTOffsetRequired)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDSTOffsetRequired), DSTOffsetRequired)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8615,12 +8615,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetTimeZoneResponse. namespace SetDSTOffset { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDSTOffset), DSTOffset)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDSTOffset), DSTOffset)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8652,12 +8652,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetDSTOffset. namespace SetDefaultNTP { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDefaultNTP), defaultNTP)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDefaultNTP), defaultNTP)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8762,11 +8762,11 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace DSTTableEmpty { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8795,12 +8795,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace DSTTableEmpty. namespace DSTStatus { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDSTOffsetActive), DSTOffsetActive)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDSTOffsetActive), DSTOffsetActive)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8832,13 +8832,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace DSTStatus. namespace TimeZoneStatus { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOffset), offset)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kName), name)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOffset), offset)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kName), name)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8873,11 +8873,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TimeZoneStatus. namespace TimeFailure { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -8906,11 +8906,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TimeFailure. namespace MissingTrustedTimeSource { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9072,12 +9072,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace StartUp { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9109,11 +9109,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StartUp. namespace ShutDown { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9142,11 +9142,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ShutDown. namespace Leave { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9175,12 +9175,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Leave. namespace ReachableChanged { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kReachableNewValue), reachableNewValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReachableNewValue), reachableNewValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9260,12 +9260,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace SwitchLatched { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewPosition), newPosition)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9297,12 +9297,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SwitchLatched. namespace InitialPress { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewPosition), newPosition)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9334,12 +9334,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace InitialPress. namespace LongPress { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewPosition), newPosition)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9371,12 +9371,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LongPress. namespace ShortRelease { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9408,12 +9408,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ShortRelease. namespace LongRelease { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9445,14 +9445,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LongRelease. namespace MultiPressOngoing { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewPosition), newPosition)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kCurrentNumberOfPressesCounted), currentNumberOfPressesCounted)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrentNumberOfPressesCounted), currentNumberOfPressesCounted)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9487,14 +9487,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MultiPressOngoing. namespace MultiPressComplete { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kTotalNumberOfPressesCounted), totalNumberOfPressesCounted)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalNumberOfPressesCounted), totalNumberOfPressesCounted)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9535,16 +9535,16 @@ namespace AdministratorCommissioning { namespace Commands { namespace OpenCommissioningWindow { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCommissioningTimeout), commissioningTimeout)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPAKEPasscodeVerifier), PAKEPasscodeVerifier)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDiscriminator), discriminator)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIterations), iterations)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSalt), salt)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCommissioningTimeout), commissioningTimeout)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPAKEPasscodeVerifier), PAKEPasscodeVerifier)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDiscriminator), discriminator)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIterations), iterations)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSalt), salt)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9588,12 +9588,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace OpenCommissioningWindow. namespace OpenBasicCommissioningWindow { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCommissioningTimeout), commissioningTimeout)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCommissioningTimeout), commissioningTimeout)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9625,11 +9625,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace OpenBasicCommissioningWindow. namespace RevokeCommissioning { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9849,12 +9849,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace AttestationRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAttestationNonce), attestationNonce)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAttestationNonce), attestationNonce)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9886,13 +9886,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AttestationRequest. namespace AttestationResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAttestationElements), attestationElements)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAttestationSignature), attestationSignature)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAttestationElements), attestationElements)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAttestationSignature), attestationSignature)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9927,12 +9927,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AttestationResponse. namespace CertificateChainRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCertificateType), certificateType)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCertificateType), certificateType)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9964,12 +9964,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace CertificateChainRequest. namespace CertificateChainResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCertificate), certificate)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCertificate), certificate)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10001,13 +10001,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace CertificateChainResponse. namespace CSRRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCSRNonce), CSRNonce)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIsForUpdateNOC), isForUpdateNOC)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCSRNonce), CSRNonce)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIsForUpdateNOC), isForUpdateNOC)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10042,13 +10042,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace CSRRequest. namespace CSRResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNOCSRElements), NOCSRElements)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAttestationSignature), attestationSignature)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNOCSRElements), NOCSRElements)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAttestationSignature), attestationSignature)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10083,16 +10083,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace CSRResponse. namespace AddNOC { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNOCValue), NOCValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kICACValue), ICACValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIPKValue), IPKValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCaseAdminSubject), caseAdminSubject)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAdminVendorId), adminVendorId)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNOCValue), NOCValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kICACValue), ICACValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIPKValue), IPKValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCaseAdminSubject), caseAdminSubject)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminVendorId), adminVendorId)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10136,13 +10136,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AddNOC. namespace UpdateNOC { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNOCValue), NOCValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kICACValue), ICACValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNOCValue), NOCValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kICACValue), ICACValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10177,14 +10177,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace UpdateNOC. namespace NOCResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusCode), statusCode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDebugText), debugText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatusCode), statusCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDebugText), debugText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10222,12 +10222,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace NOCResponse. namespace UpdateFabricLabel { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLabel), label)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLabel), label)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10259,12 +10259,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace UpdateFabricLabel. namespace RemoveFabric { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10296,12 +10296,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RemoveFabric. namespace AddTrustedRootCertificate { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRootCACertificate), rootCACertificate)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRootCACertificate), rootCACertificate)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10586,12 +10586,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace KeySetWrite { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupKeySet), groupKeySet)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupKeySet), groupKeySet)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10623,12 +10623,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace KeySetWrite. namespace KeySetRead { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupKeySetID), groupKeySetID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupKeySetID), groupKeySetID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10660,12 +10660,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace KeySetRead. namespace KeySetReadResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupKeySet), groupKeySet)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupKeySet), groupKeySet)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10697,12 +10697,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace KeySetReadResponse. namespace KeySetRemove { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupKeySetID), groupKeySetID)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupKeySetID), groupKeySetID)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10734,11 +10734,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace KeySetRemove. namespace KeySetReadAllIndices { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10767,12 +10767,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace KeySetReadAllIndices. namespace KeySetReadAllIndicesResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kGroupKeySetIDs), groupKeySetIDs)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kGroupKeySetIDs), groupKeySetIDs)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11089,12 +11089,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace StateChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStateValue), stateValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStateValue), stateValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11209,15 +11209,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace RegisterClient { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCheckInNodeID), checkInNodeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMonitoredSubject), monitoredSubject)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kKey), key)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kVerificationKey), verificationKey)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCheckInNodeID), checkInNodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMonitoredSubject), monitoredSubject)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kKey), key)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kVerificationKey), verificationKey)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11258,12 +11258,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RegisterClient. namespace RegisterClientResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kICDCounter), ICDCounter)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kICDCounter), ICDCounter)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11295,13 +11295,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace RegisterClientResponse. namespace UnregisterClient { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCheckInNodeID), checkInNodeID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kKey), key)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCheckInNodeID), checkInNodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kKey), key)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11336,11 +11336,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace UnregisterClient. namespace StayActiveRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11520,12 +11520,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ChangeToMode { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11615,12 +11615,12 @@ namespace Structs {} // namespace Structs namespace Commands { namespace ChangeToMode { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11652,13 +11652,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChangeToMode. namespace ChangeToModeResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11745,12 +11745,12 @@ namespace Structs {} // namespace Structs namespace Commands { namespace ChangeToMode { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11782,13 +11782,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChangeToMode. namespace ChangeToModeResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11925,12 +11925,12 @@ namespace Structs {} // namespace Structs namespace Commands { namespace ChangeToMode { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11962,13 +11962,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChangeToMode. namespace ChangeToModeResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12055,12 +12055,12 @@ namespace Structs {} // namespace Structs namespace Commands { namespace ChangeToMode { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12092,13 +12092,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChangeToMode. namespace ChangeToModeResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12184,13 +12184,13 @@ namespace TemperatureControl { namespace Commands { namespace SetTemperature { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTargetTemperature), targetTemperature)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTargetTemperatureLevel), targetTemperatureLevel)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTargetTemperature), targetTemperature)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTargetTemperatureLevel), targetTemperatureLevel)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12324,15 +12324,15 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace Notify { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActive), active)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInactive), inactive)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kState), state)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMask), mask)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActive), active)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInactive), inactive)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMask), mask)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12380,12 +12380,12 @@ namespace Structs {} // namespace Structs namespace Commands { namespace ChangeToMode { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNewMode), newMode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewMode), newMode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12417,13 +12417,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChangeToMode. namespace ChangeToModeResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatusText), statusText)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatusText), statusText)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12550,11 +12550,11 @@ namespace SmokeCoAlarm { namespace Commands { namespace SelfTestRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12656,11 +12656,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace SmokeAlarm { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12678,6 +12679,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kAlarmSeverityLevel): + ReturnErrorOnFailure(DataModel::Decode(reader, alarmSeverityLevel)); + break; default: break; } @@ -12689,11 +12693,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SmokeAlarm. namespace COAlarm { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12711,6 +12716,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kAlarmSeverityLevel): + ReturnErrorOnFailure(DataModel::Decode(reader, alarmSeverityLevel)); + break; default: break; } @@ -12722,11 +12730,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace COAlarm. namespace LowBattery { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12744,6 +12753,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kAlarmSeverityLevel): + ReturnErrorOnFailure(DataModel::Decode(reader, alarmSeverityLevel)); + break; default: break; } @@ -12755,11 +12767,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LowBattery. namespace HardwareFault { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12788,11 +12800,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace HardwareFault. namespace EndOfService { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12821,11 +12833,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EndOfService. namespace SelfTestComplete { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12854,11 +12866,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SelfTestComplete. namespace AlarmMuted { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12887,11 +12899,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AlarmMuted. namespace MuteEnded { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12920,11 +12932,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MuteEnded. namespace InterconnectSmokeAlarm { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12942,6 +12955,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kAlarmSeverityLevel): + ReturnErrorOnFailure(DataModel::Decode(reader, alarmSeverityLevel)); + break; default: break; } @@ -12953,11 +12969,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace InterconnectSmokeAlarm. namespace InterconnectCOAlarm { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -12975,6 +12992,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kAlarmSeverityLevel): + ReturnErrorOnFailure(DataModel::Decode(reader, alarmSeverityLevel)); + break; default: break; } @@ -12986,11 +13006,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace InterconnectCOAlarm. namespace AllClear { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13025,12 +13045,12 @@ namespace DishwasherAlarm { namespace Commands { namespace Reset { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAlarms), alarms)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarms), alarms)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13062,12 +13082,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Reset. namespace ModifyEnabledAlarms { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMask), mask)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMask), mask)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13145,15 +13165,15 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace Notify { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActive), active)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInactive), inactive)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kState), state)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMask), mask)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActive), active)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInactive), inactive)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMask), mask)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13201,11 +13221,11 @@ namespace Structs {} // namespace Structs namespace Commands { namespace Pause { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13234,11 +13254,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Pause. namespace Stop { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13267,11 +13287,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Stop. namespace Start { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13300,11 +13320,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Start. namespace Resume { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13333,12 +13353,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Resume. namespace OperationalCommandResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCommandResponseState), commandResponseState)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCommandResponseState), commandResponseState)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13422,12 +13442,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace OperationalError { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kErrorState), errorState)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13459,14 +13479,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace OperationalError. namespace OperationCompletion { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPausedTime), pausedTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPausedTime), pausedTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13511,11 +13531,11 @@ namespace Structs {} // namespace Structs namespace Commands { namespace Pause { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13544,11 +13564,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Pause. namespace Stop { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13577,11 +13597,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Stop. namespace Start { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13610,11 +13630,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Start. namespace Resume { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13643,12 +13663,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Resume. namespace OperationalCommandResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCommandResponseState), commandResponseState)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCommandResponseState), commandResponseState)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13732,12 +13752,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace OperationalError { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kErrorState), errorState)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13769,14 +13789,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace OperationalError. namespace OperationCompletion { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPausedTime), pausedTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPausedTime), pausedTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -13866,11 +13886,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -14002,11 +14022,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -14138,11 +14158,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -14274,11 +14294,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -14410,11 +14430,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -14546,11 +14566,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -14682,11 +14702,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -14818,11 +14838,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -14954,11 +14974,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15090,11 +15110,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15226,11 +15246,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15362,11 +15382,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ResetCondition { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15498,12 +15518,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace LockDoor { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPINCode), PINCode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPINCode), PINCode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15535,12 +15555,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LockDoor. namespace UnlockDoor { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPINCode), PINCode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPINCode), PINCode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15572,13 +15592,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace UnlockDoor. namespace UnlockWithTimeout { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTimeout), timeout)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPINCode), PINCode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTimeout), timeout)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPINCode), PINCode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15613,18 +15633,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace UnlockWithTimeout. namespace SetWeekDaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kWeekDayIndex), weekDayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDaysMask), daysMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStartHour), startHour)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStartMinute), startMinute)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEndHour), endHour)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEndMinute), endMinute)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kWeekDayIndex), weekDayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDaysMask), daysMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStartHour), startHour)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStartMinute), startMinute)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEndHour), endHour)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEndMinute), endMinute)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15674,13 +15694,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetWeekDaySchedule. namespace GetWeekDaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kWeekDayIndex), weekDayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kWeekDayIndex), weekDayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15715,19 +15735,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetWeekDaySchedule. namespace GetWeekDayScheduleResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kWeekDayIndex), weekDayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDaysMask), daysMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStartHour), startHour)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStartMinute), startMinute)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEndHour), endHour)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEndMinute), endMinute)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kWeekDayIndex), weekDayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDaysMask), daysMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStartHour), startHour)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStartMinute), startMinute)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEndHour), endHour)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEndMinute), endMinute)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15780,13 +15800,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetWeekDayScheduleResponse. namespace ClearWeekDaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kWeekDayIndex), weekDayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kWeekDayIndex), weekDayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15821,15 +15841,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ClearWeekDaySchedule. namespace SetYearDaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kYearDayIndex), yearDayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocalStartTime), localStartTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocalEndTime), localEndTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kYearDayIndex), yearDayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocalStartTime), localStartTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocalEndTime), localEndTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15870,13 +15890,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetYearDaySchedule. namespace GetYearDaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kYearDayIndex), yearDayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kYearDayIndex), yearDayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15911,16 +15931,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetYearDaySchedule. namespace GetYearDayScheduleResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kYearDayIndex), yearDayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocalStartTime), localStartTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocalEndTime), localEndTime)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kYearDayIndex), yearDayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocalStartTime), localStartTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocalEndTime), localEndTime)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -15964,13 +15984,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetYearDayScheduleResponse. namespace ClearYearDaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kYearDayIndex), yearDayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kYearDayIndex), yearDayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16005,15 +16025,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ClearYearDaySchedule. namespace SetHolidaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kHolidayIndex), holidayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocalStartTime), localStartTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocalEndTime), localEndTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperatingMode), operatingMode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kHolidayIndex), holidayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocalStartTime), localStartTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocalEndTime), localEndTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperatingMode), operatingMode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16054,12 +16074,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetHolidaySchedule. namespace GetHolidaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kHolidayIndex), holidayIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kHolidayIndex), holidayIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16091,16 +16111,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetHolidaySchedule. namespace GetHolidayScheduleResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kHolidayIndex), holidayIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocalStartTime), localStartTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLocalEndTime), localEndTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperatingMode), operatingMode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kHolidayIndex), holidayIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocalStartTime), localStartTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLocalEndTime), localEndTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperatingMode), operatingMode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16144,12 +16164,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetHolidayScheduleResponse. namespace ClearHolidaySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kHolidayIndex), holidayIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kHolidayIndex), holidayIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16181,18 +16201,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ClearHolidaySchedule. namespace SetUser { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperationType), operationType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserName), userName)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserUniqueID), userUniqueID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserStatus), userStatus)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserType), userType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredentialRule), credentialRule)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationType), operationType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserName), userName)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserUniqueID), userUniqueID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserStatus), userStatus)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserType), userType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentialRule), credentialRule)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16242,12 +16262,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetUser. namespace GetUser { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16279,21 +16299,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetUser. namespace GetUserResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserName), userName)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserUniqueID), userUniqueID)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserStatus), userStatus)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserType), userType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredentialRule), credentialRule)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredentials), credentials)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCreatorFabricIndex), creatorFabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLastModifiedFabricIndex), lastModifiedFabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNextUserIndex), nextUserIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserName), userName)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserUniqueID), userUniqueID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserStatus), userStatus)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserType), userType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentialRule), credentialRule)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentials), credentials)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCreatorFabricIndex), creatorFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLastModifiedFabricIndex), lastModifiedFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNextUserIndex), nextUserIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16352,12 +16372,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetUserResponse. namespace ClearUser { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16389,17 +16409,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ClearUser. namespace SetCredential { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperationType), operationType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredential), credential)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredentialData), credentialData)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserStatus), userStatus)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserType), userType)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationType), operationType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredential), credential)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentialData), credentialData)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserStatus), userStatus)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserType), userType)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16446,14 +16466,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetCredential. namespace SetCredentialResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNextCredentialIndex), nextCredentialIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNextCredentialIndex), nextCredentialIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16491,12 +16511,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetCredentialResponse. namespace GetCredentialStatus { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredential), credential)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredential), credential)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16528,16 +16548,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetCredentialStatus. namespace GetCredentialStatusResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredentialExists), credentialExists)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCreatorFabricIndex), creatorFabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLastModifiedFabricIndex), lastModifiedFabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNextCredentialIndex), nextCredentialIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentialExists), credentialExists)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCreatorFabricIndex), creatorFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLastModifiedFabricIndex), lastModifiedFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNextCredentialIndex), nextCredentialIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16581,12 +16601,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetCredentialStatusResponse. namespace ClearCredential { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredential), credential)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredential), credential)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16618,12 +16638,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ClearCredential. namespace UnboltDoor { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPINCode), PINCode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPINCode), PINCode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16797,12 +16817,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace DoorLockAlarm { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAlarmCode), alarmCode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmCode), alarmCode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16834,12 +16854,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace DoorLockAlarm. namespace DoorStateChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDoorState), doorState)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDoorState), doorState)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16871,17 +16891,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace DoorStateChange. namespace LockOperation { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLockOperationType), lockOperationType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperationSource), operationSource)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSourceNode), sourceNode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredentials), credentials)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockOperationType), lockOperationType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentials), credentials)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16928,18 +16948,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LockOperation. namespace LockOperationError { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLockOperationType), lockOperationType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperationSource), operationSource)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperationError), operationError)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSourceNode), sourceNode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCredentials), credentials)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockOperationType), lockOperationType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationError), operationError)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCredentials), credentials)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -16989,18 +17009,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LockOperationError. namespace LockUserChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLockDataType), lockDataType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDataOperationType), dataOperationType)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOperationSource), operationSource)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUserIndex), userIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSourceNode), sourceNode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDataIndex), dataIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLockDataType), lockDataType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDataOperationType), dataOperationType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOperationSource), operationSource)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUserIndex), userIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSourceNode), sourceNode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDataIndex), dataIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17056,11 +17076,11 @@ namespace WindowCovering { namespace Commands { namespace UpOrOpen { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17089,11 +17109,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace UpOrOpen. namespace DownOrClose { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17122,11 +17142,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace DownOrClose. namespace StopMotion { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17155,12 +17175,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StopMotion. namespace GoToLiftValue { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLiftValue), liftValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLiftValue), liftValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17192,12 +17212,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GoToLiftValue. namespace GoToLiftPercentage { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLiftPercent100thsValue), liftPercent100thsValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLiftPercent100thsValue), liftPercent100thsValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17229,12 +17249,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GoToLiftPercentage. namespace GoToTiltValue { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTiltValue), tiltValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTiltValue), tiltValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17266,12 +17286,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GoToTiltValue. namespace GoToTiltPercentage { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTiltPercent100thsValue), tiltPercent100thsValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTiltPercent100thsValue), tiltPercent100thsValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17408,12 +17428,12 @@ namespace BarrierControl { namespace Commands { namespace BarrierControlGoToPercent { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPercentOpen), percentOpen)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPercentOpen), percentOpen)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17445,11 +17465,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace BarrierControlGoToPercent. namespace BarrierControlStop { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17649,11 +17669,11 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace SupplyVoltageLow { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17682,11 +17702,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SupplyVoltageLow. namespace SupplyVoltageHigh { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17715,11 +17735,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SupplyVoltageHigh. namespace PowerMissingPhase { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17748,11 +17768,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace PowerMissingPhase. namespace SystemPressureLow { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17781,11 +17801,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SystemPressureLow. namespace SystemPressureHigh { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17814,11 +17834,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SystemPressureHigh. namespace DryRunning { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17847,11 +17867,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace DryRunning. namespace MotorTemperatureHigh { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17880,11 +17900,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MotorTemperatureHigh. namespace PumpMotorFatalFailure { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17913,11 +17933,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace PumpMotorFatalFailure. namespace ElectronicTemperatureHigh { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17946,11 +17966,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ElectronicTemperatureHigh. namespace PumpBlocked { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -17979,11 +17999,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace PumpBlocked. namespace SensorFailure { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18012,11 +18032,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SensorFailure. namespace ElectronicNonFatalFailure { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18045,11 +18065,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ElectronicNonFatalFailure. namespace ElectronicFatalFailure { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18078,11 +18098,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ElectronicFatalFailure. namespace GeneralFault { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18111,11 +18131,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GeneralFault. namespace Leakage { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18144,11 +18164,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Leakage. namespace AirDetection { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18177,11 +18197,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace AirDetection. namespace TurbineOperation { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18266,13 +18286,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace SetpointRaiseLower { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMode), mode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAmount), amount)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMode), mode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAmount), amount)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18307,16 +18327,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetpointRaiseLower. namespace GetWeeklyScheduleResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDayOfWeekForSequence), dayOfWeekForSequence)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kModeForSequence), modeForSequence)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitions), transitions)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDayOfWeekForSequence), dayOfWeekForSequence)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kModeForSequence), modeForSequence)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitions), transitions)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18357,16 +18377,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetWeeklyScheduleResponse. namespace SetWeeklySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDayOfWeekForSequence), dayOfWeekForSequence)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kModeForSequence), modeForSequence)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitions), transitions)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDayOfWeekForSequence), dayOfWeekForSequence)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kModeForSequence), modeForSequence)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitions), transitions)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18407,13 +18427,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SetWeeklySchedule. namespace GetWeeklySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDaysToReturn), daysToReturn)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kModeToReturn), modeToReturn)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDaysToReturn), daysToReturn)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kModeToReturn), modeToReturn)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18448,11 +18468,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetWeeklySchedule. namespace ClearWeeklySchedule { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18667,14 +18687,14 @@ namespace FanControl { namespace Commands { namespace Step { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDirection), direction)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kWrap), wrap)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLowestOff), lowestOff)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDirection), direction)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kWrap), wrap)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kLowestOff), lowestOff)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18834,16 +18854,16 @@ namespace ColorControl { namespace Commands { namespace MoveToHue { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kHue), hue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDirection), direction)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kHue), hue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDirection), direction)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18887,15 +18907,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveToHue. namespace MoveHue { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMoveMode), moveMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRate), rate)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMoveMode), moveMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRate), rate)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18936,16 +18956,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveHue. namespace StepHue { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepMode), stepMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepSize), stepSize)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepMode), stepMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepSize), stepSize)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -18989,15 +19009,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StepHue. namespace MoveToSaturation { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSaturation), saturation)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSaturation), saturation)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19038,15 +19058,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveToSaturation. namespace MoveSaturation { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMoveMode), moveMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRate), rate)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMoveMode), moveMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRate), rate)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19087,16 +19107,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveSaturation. namespace StepSaturation { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepMode), stepMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepSize), stepSize)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepMode), stepMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepSize), stepSize)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19140,16 +19160,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StepSaturation. namespace MoveToHueAndSaturation { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kHue), hue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSaturation), saturation)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kHue), hue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSaturation), saturation)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19193,16 +19213,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveToHueAndSaturation. namespace MoveToColor { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kColorX), colorX)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kColorY), colorY)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kColorX), colorX)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kColorY), colorY)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19246,15 +19266,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveToColor. namespace MoveColor { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRateX), rateX)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRateY), rateY)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRateX), rateX)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRateY), rateY)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19295,16 +19315,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveColor. namespace StepColor { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepX), stepX)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepY), stepY)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepX), stepX)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepY), stepY)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19348,15 +19368,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StepColor. namespace MoveToColorTemperature { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kColorTemperatureMireds), colorTemperatureMireds)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kColorTemperatureMireds), colorTemperatureMireds)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19397,16 +19417,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveToColorTemperature. namespace EnhancedMoveToHue { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEnhancedHue), enhancedHue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDirection), direction)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnhancedHue), enhancedHue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDirection), direction)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19450,15 +19470,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnhancedMoveToHue. namespace EnhancedMoveHue { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMoveMode), moveMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRate), rate)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMoveMode), moveMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRate), rate)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19499,16 +19519,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnhancedMoveHue. namespace EnhancedStepHue { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepMode), stepMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepSize), stepSize)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepMode), stepMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepSize), stepSize)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19552,16 +19572,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnhancedStepHue. namespace EnhancedMoveToHueAndSaturation { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kEnhancedHue), enhancedHue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSaturation), saturation)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kEnhancedHue), enhancedHue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSaturation), saturation)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19605,18 +19625,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace EnhancedMoveToHueAndSaturation. namespace ColorLoopSet { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kUpdateFlags), updateFlags)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAction), action)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDirection), direction)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTime), time)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStartHue), startHue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kUpdateFlags), updateFlags)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAction), action)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDirection), direction)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTime), time)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStartHue), startHue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19666,13 +19686,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ColorLoopSet. namespace StopMoveStep { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19707,19 +19727,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StopMoveStep. namespace MoveColorTemperature { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMoveMode), moveMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kRate), rate)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMoveMode), moveMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRate), rate)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kColorTemperatureMinimumMireds), colorTemperatureMinimumMireds)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kColorTemperatureMinimumMireds), colorTemperatureMinimumMireds)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kColorTemperatureMaximumMireds), colorTemperatureMaximumMireds)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kColorTemperatureMaximumMireds), colorTemperatureMaximumMireds)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -19766,20 +19786,20 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace MoveColorTemperature. namespace StepColorTemperature { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepMode), stepMode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStepSize), stepSize)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepMode), stepMode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStepSize), stepSize)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTransitionTime), transitionTime)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kColorTemperatureMinimumMireds), colorTemperatureMinimumMireds)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kColorTemperatureMinimumMireds), colorTemperatureMinimumMireds)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kColorTemperatureMaximumMireds), colorTemperatureMaximumMireds)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kColorTemperatureMaximumMireds), colorTemperatureMaximumMireds)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsMask), optionsMask)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionsOverride), optionsOverride)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23153,12 +23173,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace ChangeChannel { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMatch), match)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMatch), match)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23190,13 +23210,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChangeChannel. namespace ChangeChannelResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kData), data)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23231,13 +23251,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChangeChannelResponse. namespace ChangeChannelByNumber { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMajorNumber), majorNumber)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMinorNumber), minorNumber)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMajorNumber), majorNumber)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMinorNumber), minorNumber)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23272,12 +23292,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ChangeChannelByNumber. namespace SkipChannel { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kCount), count)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCount), count)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23403,13 +23423,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace NavigateTarget { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTarget), target)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kData), data)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTarget), target)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23444,13 +23464,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace NavigateTarget. namespace NavigateTargetResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kData), data)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23576,11 +23596,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace Play { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23609,11 +23629,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Play. namespace Pause { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23642,11 +23662,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Pause. namespace Stop { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23675,11 +23695,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Stop. namespace StartOver { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23708,11 +23728,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StartOver. namespace Previous { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23741,11 +23761,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Previous. namespace Next { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23774,11 +23794,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Next. namespace Rewind { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23807,11 +23827,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Rewind. namespace FastForward { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23840,12 +23860,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace FastForward. namespace SkipForward { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDeltaPositionMilliseconds), deltaPositionMilliseconds)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure( + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDeltaPositionMilliseconds), deltaPositionMilliseconds)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23877,12 +23898,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SkipForward. namespace SkipBackward { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDeltaPositionMilliseconds), deltaPositionMilliseconds)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure( + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDeltaPositionMilliseconds), deltaPositionMilliseconds)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23914,13 +23936,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SkipBackward. namespace PlaybackResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kData), data)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -23955,12 +23977,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace PlaybackResponse. namespace Seek { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPosition), position)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPosition), position)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24106,12 +24128,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace SelectInput { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIndex), index)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIndex), index)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24143,11 +24165,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SelectInput. namespace ShowInputStatus { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24176,11 +24198,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ShowInputStatus. namespace HideInputStatus { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24209,13 +24231,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace HideInputStatus. namespace RenameInput { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIndex), index)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kName), name)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIndex), index)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kName), name)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24295,11 +24317,11 @@ namespace LowPower { namespace Commands { namespace Sleep { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24367,12 +24389,12 @@ namespace KeypadInput { namespace Commands { namespace SendKey { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kKeyCode), keyCode)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kKeyCode), keyCode)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24404,12 +24426,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SendKey. namespace SendKeyResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24770,14 +24792,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace LaunchContent { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSearch), search)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAutoPlay), autoPlay)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kData), data)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSearch), search)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAutoPlay), autoPlay)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24815,14 +24837,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LaunchContent. namespace LaunchURL { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kContentURL), contentURL)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kDisplayString), displayString)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kBrandingInformation), brandingInformation)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kContentURL), contentURL)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDisplayString), displayString)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBrandingInformation), brandingInformation)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24860,13 +24882,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LaunchURL. namespace LauncherResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kData), data)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -24996,12 +25018,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace SelectOutput { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIndex), index)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIndex), index)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25033,13 +25055,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SelectOutput. namespace RenameOutput { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIndex), index)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kName), name)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIndex), index)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kName), name)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25165,13 +25187,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace LaunchApp { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kApplication), application)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kData), data)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kApplication), application)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25206,12 +25228,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace LaunchApp. namespace StopApp { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kApplication), application)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kApplication), application)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25243,12 +25265,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace StopApp. namespace HideApp { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kApplication), application)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kApplication), application)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25280,13 +25302,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace HideApp. namespace LauncherResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kData), data)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kData), data)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25429,12 +25451,12 @@ namespace AccountLogin { namespace Commands { namespace GetSetupPIN { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTempAccountIdentifier), tempAccountIdentifier)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTempAccountIdentifier), tempAccountIdentifier)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25466,12 +25488,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetSetupPIN. namespace GetSetupPINResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSetupPIN), setupPIN)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSetupPIN), setupPIN)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25503,13 +25525,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetSetupPINResponse. namespace Login { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTempAccountIdentifier), tempAccountIdentifier)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kSetupPIN), setupPIN)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTempAccountIdentifier), tempAccountIdentifier)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSetupPIN), setupPIN)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25544,11 +25566,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Login. namespace Logout { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25616,15 +25638,15 @@ namespace ElectricalMeasurement { namespace Commands { namespace GetProfileInfoResponseCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProfileCount), profileCount)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProfileIntervalPeriod), profileIntervalPeriod)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMaxNumberOfIntervals), maxNumberOfIntervals)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kListOfAttributes), listOfAttributes)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProfileCount), profileCount)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProfileIntervalPeriod), profileIntervalPeriod)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMaxNumberOfIntervals), maxNumberOfIntervals)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kListOfAttributes), listOfAttributes)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25665,11 +25687,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetProfileInfoResponseCommand. namespace GetProfileInfoCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25698,18 +25720,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetProfileInfoCommand. namespace GetMeasurementProfileResponseCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStartTime), startTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStatus), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kProfileIntervalPeriod), profileIntervalPeriod)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStartTime), startTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProfileIntervalPeriod), profileIntervalPeriod)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNumberOfIntervalsDelivered), numberOfIntervalsDelivered)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAttributeId), attributeId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kIntervals), intervals)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNumberOfIntervalsDelivered), numberOfIntervalsDelivered)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAttributeId), attributeId)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kIntervals), intervals)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -25756,14 +25778,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace GetMeasurementProfileResponseCommand. namespace GetMeasurementProfileCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAttributeId), attributeId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kStartTime), startTime)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNumberOfIntervals), numberOfIntervals)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAttributeId), attributeId)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStartTime), startTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNumberOfIntervals), numberOfIntervals)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26682,11 +26704,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Commands { namespace Test { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26715,12 +26737,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace Test. namespace TestSpecificResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kReturnValue), returnValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReturnValue), returnValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26752,11 +26774,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestSpecificResponse. namespace TestNotHandled { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26785,12 +26807,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestNotHandled. namespace TestAddArgumentsResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kReturnValue), returnValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReturnValue), returnValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26822,11 +26844,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestAddArgumentsResponse. namespace TestSpecific { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26855,12 +26877,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestSpecific. namespace TestSimpleArgumentResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kReturnValue), returnValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReturnValue), returnValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26892,11 +26914,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestSimpleArgumentResponse. namespace TestUnknownCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26925,17 +26947,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestUnknownCommand. namespace TestStructArrayArgumentResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg2), arg2)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg3), arg3)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg4), arg4)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg5), arg5)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg6), arg6)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg2), arg2)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg3), arg3)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg4), arg4)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg5), arg5)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg6), arg6)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -26982,13 +27004,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestStructArrayArgumentResponse. namespace TestAddArguments { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg2), arg2)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg2), arg2)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27023,12 +27045,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestAddArguments. namespace TestListInt8UReverseResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27060,12 +27082,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestListInt8UReverseResponse. namespace TestSimpleArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27097,13 +27119,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestSimpleArgumentRequest. namespace TestEnumsResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg2), arg2)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg2), arg2)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27138,17 +27160,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestEnumsResponse. namespace TestStructArrayArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg2), arg2)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg3), arg3)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg4), arg4)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg5), arg5)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg6), arg6)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg2), arg2)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg3), arg3)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg4), arg4)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg5), arg5)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg6), arg6)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27195,15 +27217,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestStructArrayArgumentRequest. namespace TestNullableOptionalResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kWasPresent), wasPresent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kWasNull), wasNull)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kValue), value)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOriginalValue), originalValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kWasPresent), wasPresent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kWasNull), wasNull)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValue), value)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOriginalValue), originalValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27244,12 +27266,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestNullableOptionalResponse. namespace TestStructArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27281,49 +27303,50 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestStructArgumentRequest. namespace TestComplexNullableOptionalResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableIntWasNull), nullableIntWasNull)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableIntValue), nullableIntValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalIntWasPresent), optionalIntWasPresent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalIntValue), optionalIntValue)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableIntWasNull), nullableIntWasNull)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableIntValue), nullableIntValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalIntWasPresent), optionalIntWasPresent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalIntValue), optionalIntValue)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalIntWasPresent), nullableOptionalIntWasPresent)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalIntWasPresent), nullableOptionalIntWasPresent)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalIntWasNull), nullableOptionalIntWasNull)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalIntValue), nullableOptionalIntValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableStringWasNull), nullableStringWasNull)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableStringValue), nullableStringValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalStringWasPresent), optionalStringWasPresent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalStringValue), optionalStringValue)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalIntWasNull), nullableOptionalIntWasNull)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalIntValue), nullableOptionalIntValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableStringWasNull), nullableStringWasNull)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableStringValue), nullableStringValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalStringWasPresent), optionalStringWasPresent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalStringValue), optionalStringValue)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalStringWasPresent), nullableOptionalStringWasPresent)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalStringWasPresent), nullableOptionalStringWasPresent)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalStringWasNull), nullableOptionalStringWasNull)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalStringWasNull), nullableOptionalStringWasNull)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalStringValue), nullableOptionalStringValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableStructWasNull), nullableStructWasNull)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableStructValue), nullableStructValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalStructWasPresent), optionalStructWasPresent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalStructValue), optionalStructValue)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalStringValue), nullableOptionalStringValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableStructWasNull), nullableStructWasNull)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableStructValue), nullableStructValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalStructWasPresent), optionalStructWasPresent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalStructValue), optionalStructValue)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalStructWasPresent), nullableOptionalStructWasPresent)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalStructWasPresent), nullableOptionalStructWasPresent)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalStructWasNull), nullableOptionalStructWasNull)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalStructWasNull), nullableOptionalStructWasNull)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalStructValue), nullableOptionalStructValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableListWasNull), nullableListWasNull)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableListValue), nullableListValue)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalListWasPresent), optionalListWasPresent)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalListValue), optionalListValue)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalStructValue), nullableOptionalStructValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableListWasNull), nullableListWasNull)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableListValue), nullableListValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalListWasPresent), optionalListWasPresent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalListValue), optionalListValue)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalListWasPresent), nullableOptionalListWasPresent)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalListWasPresent), nullableOptionalListWasPresent)); ReturnErrorOnFailure( - DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalListWasNull), nullableOptionalListWasNull)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalListValue), nullableOptionalListValue)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalListWasNull), nullableOptionalListWasNull)); + ReturnErrorOnFailure( + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalListValue), nullableOptionalListValue)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27436,12 +27459,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestComplexNullableOptionalResponse. namespace TestNestedStructArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27473,12 +27496,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestNestedStructArgumentRequest. namespace BooleanResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kValue), value)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValue), value)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27510,12 +27533,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace BooleanResponse. namespace TestListStructArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27547,12 +27570,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestListStructArgumentRequest. namespace SimpleStructResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27584,12 +27607,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SimpleStructResponse. namespace TestListInt8UArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27621,12 +27644,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestListInt8UArgumentRequest. namespace TestEmitTestEventResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kValue), value)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValue), value)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27658,12 +27681,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestEmitTestEventResponse. namespace TestNestedStructListArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27695,12 +27718,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestNestedStructListArgumentRequest. namespace TestEmitTestFabricScopedEventResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kValue), value)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValue), value)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27732,12 +27755,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestEmitTestFabricScopedEventResponse. namespace TestListNestedStructListArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27769,12 +27792,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestListNestedStructListArgumentRequest. namespace TestListInt8UReverseRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27806,13 +27829,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestListInt8UReverseRequest. namespace TestEnumsRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg2), arg2)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg2), arg2)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27847,12 +27870,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestEnumsRequest. namespace TestNullableOptionalRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27884,23 +27907,23 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestNullableOptionalRequest. namespace TestComplexNullableOptionalRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableInt), nullableInt)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalInt), optionalInt)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalInt), nullableOptionalInt)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableString), nullableString)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalString), optionalString)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalString), nullableOptionalString)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableStruct), nullableStruct)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalStruct), optionalStruct)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalStruct), nullableOptionalStruct)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableList), nullableList)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kOptionalList), optionalList)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNullableOptionalList), nullableOptionalList)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableInt), nullableInt)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalInt), optionalInt)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalInt), nullableOptionalInt)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableString), nullableString)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalString), optionalString)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalString), nullableOptionalString)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableStruct), nullableStruct)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalStruct), optionalStruct)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalStruct), nullableOptionalStruct)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableList), nullableList)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOptionalList), optionalList)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNullableOptionalList), nullableOptionalList)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -27965,12 +27988,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestComplexNullableOptionalRequest. namespace SimpleStructEchoRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -28002,11 +28025,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace SimpleStructEchoRequest. namespace TimedInvokeRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -28035,12 +28058,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TimedInvokeRequest. namespace TestSimpleOptionalArgumentRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -28072,14 +28095,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestSimpleOptionalArgumentRequest. namespace TestEmitTestEventRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg2), arg2)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg3), arg3)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg2), arg2)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg3), arg3)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -28117,12 +28140,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestEmitTestEventRequest. namespace TestEmitTestFabricScopedEventRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -28434,17 +28457,17 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events { namespace TestEvent { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg1), arg1)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg2), arg2)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg3), arg3)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg4), arg4)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg5), arg5)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kArg6), arg6)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg1), arg1)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg2), arg2)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg3), arg3)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg4), arg4)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg5), arg5)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kArg6), arg6)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -28491,12 +28514,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace TestEvent. namespace TestFabricScopedEvent { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -28534,16 +28557,16 @@ namespace FaultInjection { namespace Commands { namespace FailAtFault { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kType), type)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kId), id)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNumCallsToSkip), numCallsToSkip)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kNumCallsToFail), numCallsToFail)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTakeMutex), takeMutex)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kType), type)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kId), id)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNumCallsToSkip), numCallsToSkip)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNumCallsToFail), numCallsToFail)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTakeMutex), takeMutex)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -28587,14 +28610,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace FailAtFault. namespace FailRandomlyAtFault { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kType), type)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kId), id)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPercentage), percentage)); - ReturnErrorOnFailure(writer.EndContainer(outer)); + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kType), type)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kId), id)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPercentage), percentage)); + ReturnErrorOnFailure(aWriter.EndContainer(outer)); return CHIP_NO_ERROR; } 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 e87c3ec19511ba..34cc96f868bcc7 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 @@ -306,7 +306,7 @@ struct Type uint16_t identifyTime = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -340,7 +340,7 @@ struct Type EffectIdentifierEnum effectIdentifier = static_cast(0); EffectVariantEnum effectVariant = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -519,7 +519,7 @@ struct Type chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Groups::Commands::AddGroupResponse::DecodableType; @@ -554,7 +554,7 @@ struct Type uint8_t status = static_cast(0); chip::GroupId groupID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -587,7 +587,7 @@ struct Type chip::GroupId groupID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Groups::Commands::ViewGroupResponse::DecodableType; @@ -623,7 +623,7 @@ struct Type chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -657,7 +657,7 @@ struct Type DataModel::List groupList; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType; @@ -691,7 +691,7 @@ struct Type DataModel::Nullable capacity; DataModel::List groupList; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -724,7 +724,7 @@ struct Type chip::GroupId groupID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Groups::Commands::RemoveGroupResponse::DecodableType; @@ -758,7 +758,7 @@ struct Type uint8_t status = static_cast(0); chip::GroupId groupID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -788,7 +788,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveAllGroups::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -821,7 +821,7 @@ struct Type chip::GroupId groupID = static_cast(0); chip::CharSpan groupName; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1093,7 +1093,7 @@ struct Type chip::CharSpan sceneName; DataModel::List extensionFieldSets; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::AddSceneResponse::DecodableType; @@ -1133,7 +1133,7 @@ struct Type chip::GroupId groupID = static_cast(0); uint8_t sceneID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1169,7 +1169,7 @@ struct Type chip::GroupId groupID = static_cast(0); uint8_t sceneID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::ViewSceneResponse::DecodableType; @@ -1212,7 +1212,7 @@ struct Type Optional sceneName; Optional> extensionFieldSets; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1251,7 +1251,7 @@ struct Type chip::GroupId groupID = static_cast(0); uint8_t sceneID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType; @@ -1288,7 +1288,7 @@ struct Type chip::GroupId groupID = static_cast(0); uint8_t sceneID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1322,7 +1322,7 @@ struct Type chip::GroupId groupID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType; @@ -1356,7 +1356,7 @@ struct Type uint8_t status = static_cast(0); chip::GroupId groupID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1391,7 +1391,7 @@ struct Type chip::GroupId groupID = static_cast(0); uint8_t sceneID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::StoreSceneResponse::DecodableType; @@ -1428,7 +1428,7 @@ struct Type chip::GroupId groupID = static_cast(0); uint8_t sceneID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1466,7 +1466,7 @@ struct Type uint8_t sceneID = static_cast(0); Optional> transitionTime; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1500,7 +1500,7 @@ struct Type chip::GroupId groupID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType; @@ -1538,7 +1538,7 @@ struct Type chip::GroupId groupID = static_cast(0); Optional> sceneList; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1581,7 +1581,7 @@ struct Type chip::CharSpan sceneName; DataModel::List extensionFieldSets; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType; @@ -1621,7 +1621,7 @@ struct Type chip::GroupId groupID = static_cast(0); uint8_t sceneID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1657,7 +1657,7 @@ struct Type chip::GroupId groupID = static_cast(0); uint8_t sceneID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType; @@ -1700,7 +1700,7 @@ struct Type Optional sceneName; Optional> extensionFieldSets; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -1745,7 +1745,7 @@ struct Type chip::GroupId groupIdentifierTo = static_cast(0); uint8_t sceneIdentifierTo = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Scenes::Commands::CopySceneResponse::DecodableType; @@ -1785,7 +1785,7 @@ struct Type chip::GroupId groupIdentifierFrom = static_cast(0); uint8_t sceneIdentifierFrom = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2017,7 +2017,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Off::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2045,7 +2045,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::On::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2073,7 +2073,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Toggle::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2106,7 +2106,7 @@ struct Type OnOffEffectIdentifier effectIdentifier = static_cast(0); uint8_t effectVariant = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2136,7 +2136,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OnWithRecallGlobalScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2171,7 +2171,7 @@ struct Type uint16_t onTime = static_cast(0); uint16_t offWaitTime = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2473,7 +2473,7 @@ struct Type chip::BitMask optionsMask = static_cast>(0); chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2514,7 +2514,7 @@ struct Type chip::BitMask optionsMask = static_cast>(0); chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2557,7 +2557,7 @@ struct Type chip::BitMask optionsMask = static_cast>(0); chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2595,7 +2595,7 @@ struct Type chip::BitMask optionsMask = static_cast>(0); chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2634,7 +2634,7 @@ struct Type chip::BitMask optionsMask = static_cast>(0); chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2675,7 +2675,7 @@ struct Type chip::BitMask optionsMask = static_cast>(0); chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2718,7 +2718,7 @@ struct Type chip::BitMask optionsMask = static_cast>(0); chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2756,7 +2756,7 @@ struct Type chip::BitMask optionsMask = static_cast>(0); chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -2789,7 +2789,7 @@ struct Type uint16_t frequency = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -3801,7 +3801,7 @@ struct Type auto GetFabricIndex() const { return fabricIndex; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -3848,7 +3848,7 @@ struct Type auto GetFabricIndex() const { return fabricIndex; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -4023,7 +4023,7 @@ struct Type uint16_t actionID = static_cast(0); Optional invokeID; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4060,7 +4060,7 @@ struct Type Optional invokeID; uint16_t transitionTime = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4096,7 +4096,7 @@ struct Type uint16_t actionID = static_cast(0); Optional invokeID; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4133,7 +4133,7 @@ struct Type Optional invokeID; uint32_t duration = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4169,7 +4169,7 @@ struct Type uint16_t actionID = static_cast(0); Optional invokeID; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4204,7 +4204,7 @@ struct Type uint16_t actionID = static_cast(0); Optional invokeID; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4241,7 +4241,7 @@ struct Type Optional invokeID; uint32_t duration = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4277,7 +4277,7 @@ struct Type uint16_t actionID = static_cast(0); Optional invokeID; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4312,7 +4312,7 @@ struct Type uint16_t actionID = static_cast(0); Optional invokeID; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4349,7 +4349,7 @@ struct Type Optional invokeID; uint32_t duration = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4385,7 +4385,7 @@ struct Type uint16_t actionID = static_cast(0); Optional invokeID; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4422,7 +4422,7 @@ struct Type Optional invokeID; uint32_t duration = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -4565,7 +4565,7 @@ struct Type uint32_t invokeID = static_cast(0); ActionStateEnum newState = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -4606,7 +4606,7 @@ struct Type ActionStateEnum newState = static_cast(0); ActionErrorEnum error = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -4699,7 +4699,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MfgSpecificPing::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -5077,7 +5077,7 @@ struct Type uint32_t softwareVersion = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -5107,7 +5107,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -5138,7 +5138,7 @@ struct Type chip::FabricIndex fabricIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -5171,7 +5171,7 @@ struct Type bool reachableNewValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -5250,7 +5250,7 @@ struct Type Optional requestorCanConsent; Optional metadataForProvider; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; @@ -5303,7 +5303,7 @@ struct Type Optional userConsentNeeded; Optional metadataForRequestor; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -5344,7 +5344,7 @@ struct Type chip::ByteSpan updateToken; uint32_t newVersion = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType; @@ -5379,7 +5379,7 @@ struct Type OTAApplyUpdateAction action = static_cast(0); uint32_t delayedActionTime = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -5414,7 +5414,7 @@ struct Type chip::ByteSpan updateToken; uint32_t softwareVersion = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -5562,7 +5562,7 @@ struct Type Optional metadataForNode; chip::EndpointId endpoint = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -5721,7 +5721,7 @@ struct Type OTAChangeReasonEnum reason = static_cast(0); DataModel::Nullable targetSoftwareVersion; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -5759,7 +5759,7 @@ struct Type uint32_t softwareVersion = static_cast(0); uint16_t productID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -5799,7 +5799,7 @@ struct Type DataModel::Nullable progressPercent; DataModel::Nullable platformCode; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -6736,7 +6736,7 @@ struct Type DataModel::List current; DataModel::List previous; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -6772,7 +6772,7 @@ struct Type DataModel::List current; DataModel::List previous; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -6808,7 +6808,7 @@ struct Type DataModel::List current; DataModel::List previous; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -6906,7 +6906,7 @@ struct Type uint16_t expiryLengthSeconds = static_cast(0); uint64_t breadcrumb = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType; @@ -6941,7 +6941,7 @@ struct Type CommissioningErrorEnum errorCode = static_cast(0); chip::CharSpan debugText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -6978,7 +6978,7 @@ struct Type chip::CharSpan countryCode; uint64_t breadcrumb = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType; @@ -7014,7 +7014,7 @@ struct Type CommissioningErrorEnum errorCode = static_cast(0); chip::CharSpan debugText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -7044,7 +7044,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CommissioningComplete::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType; @@ -7077,7 +7077,7 @@ struct Type CommissioningErrorEnum errorCode = static_cast(0); chip::CharSpan debugText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -7382,7 +7382,7 @@ struct Type Optional> ssid; Optional breadcrumb; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType; @@ -7421,7 +7421,7 @@ struct Type Optional> wiFiScanResults; Optional> threadScanResults; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -7460,7 +7460,7 @@ struct Type chip::ByteSpan credentials; Optional breadcrumb; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; @@ -7496,7 +7496,7 @@ struct Type chip::ByteSpan operationalDataset; Optional breadcrumb; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; @@ -7531,7 +7531,7 @@ struct Type chip::ByteSpan networkID; Optional breadcrumb; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; @@ -7568,7 +7568,7 @@ struct Type Optional debugText; Optional networkIndex; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -7604,7 +7604,7 @@ struct Type chip::ByteSpan networkID; Optional breadcrumb; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType; @@ -7641,7 +7641,7 @@ struct Type Optional debugText; DataModel::Nullable errorValue; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -7679,7 +7679,7 @@ struct Type uint8_t networkIndex = static_cast(0); Optional breadcrumb; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; @@ -7902,7 +7902,7 @@ struct Type TransferProtocolEnum requestedProtocol = static_cast(0); Optional transferFileDesignator; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType; @@ -7942,7 +7942,7 @@ struct Type Optional UTCTimeStamp; Optional timeSinceBoot; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -8101,7 +8101,7 @@ struct Type chip::ByteSpan enableKey; uint64_t eventTrigger = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -8319,7 +8319,7 @@ struct Type DataModel::List current; DataModel::List previous; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -8355,7 +8355,7 @@ struct Type DataModel::List current; DataModel::List previous; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -8391,7 +8391,7 @@ struct Type DataModel::List current; DataModel::List previous; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -8425,7 +8425,7 @@ struct Type BootReasonEnum bootReason = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -8498,7 +8498,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetWatermarks::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -8649,7 +8649,7 @@ struct Type Optional name; Optional faultRecording; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -8847,7 +8847,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCounts::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -9774,7 +9774,7 @@ struct Type ConnectionStatusEnum connectionStatus = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -9809,7 +9809,7 @@ struct Type DataModel::List current; DataModel::List previous; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -9852,7 +9852,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCounts::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -10115,7 +10115,7 @@ struct Type uint16_t reasonCode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -10150,7 +10150,7 @@ struct Type AssociationFailureCauseEnum associationFailure = static_cast(0); uint16_t status = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -10184,7 +10184,7 @@ struct Type ConnectionStatusEnum connectionStatus = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -10226,7 +10226,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCounts::Id; } static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -10575,7 +10575,7 @@ struct Type GranularityEnum granularity = static_cast(0); Optional timeSource; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -10609,7 +10609,7 @@ struct Type DataModel::Nullable trustedTimeSource; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -10641,7 +10641,7 @@ struct Type DataModel::List timeZone; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType; @@ -10673,7 +10673,7 @@ struct Type bool DSTOffsetRequired = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -10705,7 +10705,7 @@ struct Type DataModel::List DSTOffset; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -10737,7 +10737,7 @@ struct Type DataModel::Nullable defaultNTP; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -11007,7 +11007,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11038,7 +11038,7 @@ struct Type bool DSTOffsetActive = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11073,7 +11073,7 @@ struct Type int32_t offset = static_cast(0); Optional name; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11104,7 +11104,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11132,7 +11132,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11469,7 +11469,7 @@ struct Type uint32_t softwareVersion = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11499,7 +11499,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11527,7 +11527,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11558,7 +11558,7 @@ struct Type bool reachableNewValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11691,7 +11691,7 @@ struct Type uint8_t newPosition = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11724,7 +11724,7 @@ struct Type uint8_t newPosition = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11757,7 +11757,7 @@ struct Type uint8_t newPosition = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11790,7 +11790,7 @@ struct Type uint8_t previousPosition = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11823,7 +11823,7 @@ struct Type uint8_t previousPosition = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11858,7 +11858,7 @@ struct Type uint8_t newPosition = static_cast(0); uint8_t currentNumberOfPressesCounted = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11894,7 +11894,7 @@ struct Type uint8_t previousPosition = static_cast(0); uint8_t totalNumberOfPressesCounted = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -11958,7 +11958,7 @@ struct Type uint32_t iterations = static_cast(0); chip::ByteSpan salt; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -11994,7 +11994,7 @@ struct Type uint16_t commissioningTimeout = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -12023,7 +12023,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RevokeCommissioning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -12295,7 +12295,7 @@ struct Type chip::ByteSpan attestationNonce; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType; @@ -12329,7 +12329,7 @@ struct Type chip::ByteSpan attestationElements; chip::ByteSpan attestationSignature; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -12362,7 +12362,7 @@ struct Type CertificateChainTypeEnum certificateType = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType; @@ -12394,7 +12394,7 @@ struct Type chip::ByteSpan certificate; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -12428,7 +12428,7 @@ struct Type chip::ByteSpan CSRNonce; Optional isForUpdateNOC; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; @@ -12463,7 +12463,7 @@ struct Type chip::ByteSpan NOCSRElements; chip::ByteSpan attestationSignature; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -12504,7 +12504,7 @@ struct Type uint64_t caseAdminSubject = static_cast(0); chip::VendorId adminVendorId = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; @@ -12542,7 +12542,7 @@ struct Type chip::ByteSpan NOCValue; Optional ICACValue; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; @@ -12579,7 +12579,7 @@ struct Type Optional fabricIndex; Optional debugText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -12613,7 +12613,7 @@ struct Type chip::CharSpan label; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; @@ -12645,7 +12645,7 @@ struct Type chip::FabricIndex fabricIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; @@ -12677,7 +12677,7 @@ struct Type chip::ByteSpan rootCACertificate; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -13007,7 +13007,7 @@ struct Type Structs::GroupKeySetStruct::Type groupKeySet; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -13039,7 +13039,7 @@ struct Type uint16_t groupKeySetID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType; @@ -13071,7 +13071,7 @@ struct Type Structs::GroupKeySetStruct::Type groupKeySet; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -13103,7 +13103,7 @@ struct Type uint16_t groupKeySetID = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -13132,7 +13132,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndices::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; @@ -13163,7 +13163,7 @@ struct Type DataModel::List groupKeySetIDs; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -13714,7 +13714,7 @@ struct Type bool stateValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -13817,7 +13817,7 @@ struct Type chip::ByteSpan key; Optional verificationKey; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType; @@ -13852,7 +13852,7 @@ struct Type uint32_t ICDCounter = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -13886,7 +13886,7 @@ struct Type chip::NodeId checkInNodeID = static_cast(0); Optional key; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -13916,7 +13916,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StayActiveRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -14157,7 +14157,7 @@ struct Type uint8_t newMode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -14351,7 +14351,7 @@ struct Type uint8_t newMode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; @@ -14385,7 +14385,7 @@ struct Type uint8_t status = static_cast(0); Optional statusText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -14553,7 +14553,7 @@ struct Type uint8_t newMode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; @@ -14587,7 +14587,7 @@ struct Type uint8_t status = static_cast(0); Optional statusText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -14869,7 +14869,7 @@ struct Type uint8_t newMode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; @@ -14903,7 +14903,7 @@ struct Type uint8_t status = static_cast(0); Optional statusText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -15071,7 +15071,7 @@ struct Type uint8_t newMode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; @@ -15105,7 +15105,7 @@ struct Type uint8_t status = static_cast(0); Optional statusText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -15266,7 +15266,7 @@ struct Type Optional targetTemperature; Optional targetTemperatureLevel; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -15546,7 +15546,7 @@ struct Type chip::BitMask state = static_cast>(0); chip::BitMask mask = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -15603,7 +15603,7 @@ struct Type uint8_t newMode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; @@ -15637,7 +15637,7 @@ struct Type uint8_t status = static_cast(0); Optional statusText; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -15866,7 +15866,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SelfTestRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -16120,10 +16120,11 @@ struct TypeInfo } // namespace Attributes namespace Events { namespace SmokeAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { + kAlarmSeverityLevel = 0, }; struct Type @@ -16134,7 +16135,9 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16144,14 +16147,17 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::SmokeAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + AlarmStateEnum alarmSeverityLevel = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace SmokeAlarm namespace COAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { + kAlarmSeverityLevel = 0, }; struct Type @@ -16162,7 +16168,9 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16172,6 +16180,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::COAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + AlarmStateEnum alarmSeverityLevel = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace COAlarm @@ -16180,6 +16190,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kAlarmSeverityLevel = 0, }; struct Type @@ -16190,7 +16201,9 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16200,6 +16213,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::LowBattery::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + AlarmStateEnum alarmSeverityLevel = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace LowBattery @@ -16218,7 +16233,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16246,7 +16261,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16274,7 +16289,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16302,7 +16317,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16330,7 +16345,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16344,10 +16359,11 @@ struct DecodableType }; } // namespace MuteEnded namespace InterconnectSmokeAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { + kAlarmSeverityLevel = 0, }; struct Type @@ -16358,7 +16374,9 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16368,14 +16386,17 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::InterconnectSmokeAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + AlarmStateEnum alarmSeverityLevel = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace InterconnectSmokeAlarm namespace InterconnectCOAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { + kAlarmSeverityLevel = 0, }; struct Type @@ -16386,7 +16407,9 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16396,6 +16419,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::InterconnectCOAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + AlarmStateEnum alarmSeverityLevel = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace InterconnectCOAlarm @@ -16414,7 +16439,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16462,7 +16487,7 @@ struct Type chip::BitMask alarms = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -16494,7 +16519,7 @@ struct Type chip::BitMask mask = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -16650,7 +16675,7 @@ struct Type chip::BitMask state = static_cast>(0); chip::BitMask mask = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -16719,7 +16744,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; @@ -16747,7 +16772,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; @@ -16775,7 +16800,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Start::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; @@ -16803,7 +16828,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; @@ -16834,7 +16859,7 @@ struct Type Structs::ErrorStateStruct::Type commandResponseState; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -16908,9 +16933,9 @@ struct TypeInfo namespace OperationalState { struct TypeInfo { - using Type = chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::Type; - using DecodableType = chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType &; + using Type = chip::app::Clusters::OperationalState::OperationalStateEnum; + using DecodableType = chip::app::Clusters::OperationalState::OperationalStateEnum; + using DecodableArgType = chip::app::Clusters::OperationalState::OperationalStateEnum; static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } @@ -16978,7 +17003,8 @@ struct TypeInfo Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; - Attributes::OperationalState::TypeInfo::DecodableType operationalState; + Attributes::OperationalState::TypeInfo::DecodableType operationalState = + static_cast(0); Attributes::OperationalError::TypeInfo::DecodableType operationalError; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; @@ -17008,7 +17034,7 @@ struct Type Structs::ErrorStateStruct::Type errorState; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -17045,7 +17071,7 @@ struct Type Optional> totalOperationalTime; Optional> pausedTime; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -17113,7 +17139,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; @@ -17141,7 +17167,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; @@ -17169,7 +17195,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Start::Id; } static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; @@ -17197,7 +17223,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; @@ -17228,7 +17254,7 @@ struct Type Structs::ErrorStateStruct::Type commandResponseState; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -17302,9 +17328,9 @@ struct TypeInfo namespace OperationalState { struct TypeInfo { - using Type = chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::Type; - using DecodableType = chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } @@ -17372,7 +17398,7 @@ struct TypeInfo Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; - Attributes::OperationalState::TypeInfo::DecodableType operationalState; + Attributes::OperationalState::TypeInfo::DecodableType operationalState = static_cast(0); Attributes::OperationalError::TypeInfo::DecodableType operationalError; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; @@ -17402,7 +17428,7 @@ struct Type Structs::ErrorStateStruct::Type errorState; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -17439,7 +17465,7 @@ struct Type Optional> totalOperationalTime; Optional> pausedTime; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -17508,7 +17534,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::HepaFilterMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -17716,7 +17742,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -17924,7 +17950,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CeramicFilterMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -18132,7 +18158,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ElectrostaticFilterMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -18340,7 +18366,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::UvFilterMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -18547,7 +18573,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IonizingFilterMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -18755,7 +18781,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ZeoliteFilterMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -18963,7 +18989,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OzoneFilterMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -19171,7 +19197,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WaterTankMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -19379,7 +19405,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::FuelTankMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -19586,7 +19612,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::InkCartridgeMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -19794,7 +19820,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TonerCartridgeMonitoring::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20125,7 +20151,7 @@ struct Type Optional PINCode; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20157,7 +20183,7 @@ struct Type Optional PINCode; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20191,7 +20217,7 @@ struct Type uint16_t timeout = static_cast(0); Optional PINCode; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20236,7 +20262,7 @@ struct Type uint8_t endHour = static_cast(0); uint8_t endMinute = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20276,7 +20302,7 @@ struct Type uint8_t weekDayIndex = static_cast(0); uint16_t userIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType; @@ -20323,7 +20349,7 @@ struct Type Optional endHour; Optional endMinute; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20364,7 +20390,7 @@ struct Type uint8_t weekDayIndex = static_cast(0); uint16_t userIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20403,7 +20429,7 @@ struct Type uint32_t localStartTime = static_cast(0); uint32_t localEndTime = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20440,7 +20466,7 @@ struct Type uint8_t yearDayIndex = static_cast(0); uint16_t userIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType; @@ -20481,7 +20507,7 @@ struct Type Optional localStartTime; Optional localEndTime; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20519,7 +20545,7 @@ struct Type uint8_t yearDayIndex = static_cast(0); uint16_t userIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20558,7 +20584,7 @@ struct Type uint32_t localEndTime = static_cast(0); OperatingModeEnum operatingMode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20593,7 +20619,7 @@ struct Type uint8_t holidayIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType; @@ -20633,7 +20659,7 @@ struct Type Optional localEndTime; Optional operatingMode; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20669,7 +20695,7 @@ struct Type uint8_t holidayIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20713,7 +20739,7 @@ struct Type DataModel::Nullable userType; DataModel::Nullable credentialRule; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20751,7 +20777,7 @@ struct Type uint16_t userIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::DoorLock::Commands::GetUserResponse::DecodableType; @@ -20801,7 +20827,7 @@ struct Type DataModel::Nullable lastModifiedFabricIndex; DataModel::Nullable nextUserIndex; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20842,7 +20868,7 @@ struct Type uint16_t userIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20884,7 +20910,7 @@ struct Type DataModel::Nullable userStatus; DataModel::Nullable userType; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType; @@ -20925,7 +20951,7 @@ struct Type DataModel::Nullable userIndex; DataModel::Nullable nextCredentialIndex; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -20959,7 +20985,7 @@ struct Type Structs::CredentialStruct::Type credential; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType; @@ -20999,7 +21025,7 @@ struct Type DataModel::Nullable lastModifiedFabricIndex; DataModel::Nullable nextCredentialIndex; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -21035,7 +21061,7 @@ struct Type DataModel::Nullable credential; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -21067,7 +21093,7 @@ struct Type Optional PINCode; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -21639,7 +21665,7 @@ struct Type AlarmCodeEnum alarmCode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -21672,7 +21698,7 @@ struct Type DoorStateEnum doorState = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -21715,7 +21741,7 @@ struct Type DataModel::Nullable sourceNode; Optional>> credentials; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -21765,7 +21791,7 @@ struct Type DataModel::Nullable sourceNode; Optional>> credentials; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -21816,7 +21842,7 @@ struct Type DataModel::Nullable sourceNode; DataModel::Nullable dataIndex; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -21894,7 +21920,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::UpOrOpen::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -21922,7 +21948,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::DownOrClose::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -21950,7 +21976,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StopMotion::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -21981,7 +22007,7 @@ struct Type uint16_t liftValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -22013,7 +22039,7 @@ struct Type chip::Percent100ths liftPercent100thsValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -22045,7 +22071,7 @@ struct Type uint16_t tiltValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -22077,7 +22103,7 @@ struct Type chip::Percent100ths tiltPercent100thsValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -22476,7 +22502,7 @@ struct Type uint8_t percentOpen = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -22505,7 +22531,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -23088,7 +23114,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23116,7 +23142,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23144,7 +23170,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23172,7 +23198,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23200,7 +23226,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23228,7 +23254,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23256,7 +23282,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23284,7 +23310,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23312,7 +23338,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23340,7 +23366,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23368,7 +23394,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23396,7 +23422,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23424,7 +23450,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23452,7 +23478,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23480,7 +23506,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23508,7 +23534,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23536,7 +23562,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -23628,7 +23654,7 @@ struct Type SetpointAdjustMode mode = static_cast(0); int8_t amount = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -23667,7 +23693,7 @@ struct Type chip::BitMask modeForSequence = static_cast>(0); DataModel::List transitions; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -23708,7 +23734,7 @@ struct Type chip::BitMask modeForSequence = static_cast>(0); DataModel::List transitions; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -23745,7 +23771,7 @@ struct Type chip::BitMask daysToReturn = static_cast>(0); chip::BitMask modeToReturn = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType; @@ -23775,7 +23801,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -24521,7 +24547,7 @@ struct Type Optional wrap; Optional lowestOff; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -24985,7 +25011,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25027,7 +25053,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25070,7 +25096,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25112,7 +25138,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25153,7 +25179,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25196,7 +25222,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25240,7 +25266,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25284,7 +25310,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25326,7 +25352,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25369,7 +25395,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25411,7 +25437,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25454,7 +25480,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25496,7 +25522,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25539,7 +25565,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25583,7 +25609,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25631,7 +25657,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25671,7 +25697,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25714,7 +25740,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -25763,7 +25789,7 @@ struct Type uint8_t optionsMask = static_cast(0); uint8_t optionsOverride = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -35179,7 +35205,7 @@ struct Type chip::CharSpan match; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::Channel::Commands::ChangeChannelResponse::DecodableType; @@ -35213,7 +35239,7 @@ struct Type ChannelStatusEnum status = static_cast(0); Optional data; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -35248,7 +35274,7 @@ struct Type uint16_t majorNumber = static_cast(0); uint16_t minorNumber = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -35281,7 +35307,7 @@ struct Type int16_t count = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -35460,7 +35486,7 @@ struct Type uint8_t target = static_cast(0); Optional data; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType; @@ -35495,7 +35521,7 @@ struct Type TargetNavigatorStatusEnum status = static_cast(0); Optional data; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -35705,7 +35731,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Play::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35733,7 +35759,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35761,7 +35787,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35789,7 +35815,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StartOver::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35817,7 +35843,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Previous::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35845,7 +35871,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Next::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35873,7 +35899,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Rewind::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35901,7 +35927,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::FastForward::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35932,7 +35958,7 @@ struct Type uint64_t deltaPositionMilliseconds = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35964,7 +35990,7 @@ struct Type uint64_t deltaPositionMilliseconds = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -35998,7 +36024,7 @@ struct Type MediaPlaybackStatusEnum status = static_cast(0); Optional data; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -36031,7 +36057,7 @@ struct Type uint64_t position = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType; @@ -36273,7 +36299,7 @@ struct Type uint8_t index = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -36302,7 +36328,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ShowInputStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -36330,7 +36356,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::HideInputStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -36363,7 +36389,7 @@ struct Type uint8_t index = static_cast(0); chip::CharSpan name; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -36493,7 +36519,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Sleep::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -36601,7 +36627,7 @@ struct Type CecKeyCode keyCode = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType; @@ -36633,7 +36659,7 @@ struct Type KeypadInputStatusEnum status = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -36917,7 +36943,7 @@ struct Type bool autoPlay = static_cast(0); Optional data; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType; @@ -36955,7 +36981,7 @@ struct Type Optional displayString; Optional brandingInformation; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType; @@ -36991,7 +37017,7 @@ struct Type ContentLaunchStatusEnum status = static_cast(0); Optional data; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -37154,7 +37180,7 @@ struct Type uint8_t index = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -37188,7 +37214,7 @@ struct Type uint8_t index = static_cast(0); chip::CharSpan name; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -37364,7 +37390,7 @@ struct Type Optional application; Optional data; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; @@ -37397,7 +37423,7 @@ struct Type Optional application; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; @@ -37429,7 +37455,7 @@ struct Type Optional application; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType; @@ -37463,7 +37489,7 @@ struct Type ApplicationLauncherStatusEnum status = static_cast(0); Optional data; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -37781,7 +37807,7 @@ struct Type chip::CharSpan tempAccountIdentifier; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType; @@ -37813,7 +37839,7 @@ struct Type chip::CharSpan setupPIN; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -37847,7 +37873,7 @@ struct Type chip::CharSpan tempAccountIdentifier; chip::CharSpan setupPIN; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -37877,7 +37903,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -38001,7 +38027,7 @@ struct Type uint8_t maxNumberOfIntervals = static_cast(0); DataModel::List listOfAttributes; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -38033,7 +38059,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetProfileInfoCommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -38074,7 +38100,7 @@ struct Type uint16_t attributeId = static_cast(0); DataModel::List intervals; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -38115,7 +38141,7 @@ struct Type uint32_t startTime = static_cast(0); uint8_t numberOfIntervals = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40341,7 +40367,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Test::Id; } static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40372,7 +40398,7 @@ struct Type uint8_t returnValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40401,7 +40427,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestNotHandled::Id; } static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40432,7 +40458,7 @@ struct Type uint8_t returnValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40461,7 +40487,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestSpecific::Id; } static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType; @@ -40492,7 +40518,7 @@ struct Type bool returnValue = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40521,7 +40547,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestUnknownCommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40562,7 +40588,7 @@ struct Type SimpleEnum arg5 = static_cast(0); bool arg6 = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40601,7 +40627,7 @@ struct Type uint8_t arg1 = static_cast(0); uint8_t arg2 = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType; @@ -40634,7 +40660,7 @@ struct Type DataModel::List arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40666,7 +40692,7 @@ struct Type bool arg1 = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType; @@ -40700,7 +40726,7 @@ struct Type chip::VendorId arg1 = static_cast(0); SimpleEnum arg2 = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40743,7 +40769,7 @@ struct Type SimpleEnum arg5 = static_cast(0); bool arg6 = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType; @@ -40786,7 +40812,7 @@ struct Type Optional value; Optional> originalValue; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40821,7 +40847,7 @@ struct Type Structs::SimpleStruct::Type arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType; @@ -40907,7 +40933,7 @@ struct Type Optional nullableOptionalListWasNull; Optional> nullableOptionalListValue; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -40966,7 +40992,7 @@ struct Type Structs::NestedStruct::Type arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType; @@ -40998,7 +41024,7 @@ struct Type bool value = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -41030,7 +41056,7 @@ struct Type DataModel::List arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType; @@ -41062,7 +41088,7 @@ struct Type Structs::SimpleStruct::Type arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -41094,7 +41120,7 @@ struct Type DataModel::List arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType; @@ -41126,7 +41152,7 @@ struct Type uint64_t value = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -41158,7 +41184,7 @@ struct Type Structs::NestedStructList::Type arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType; @@ -41190,7 +41216,7 @@ struct Type uint64_t value = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -41222,7 +41248,7 @@ struct Type DataModel::List arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::BooleanResponse::DecodableType; @@ -41254,7 +41280,7 @@ struct Type DataModel::List arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType; @@ -41288,7 +41314,7 @@ struct Type chip::VendorId arg1 = static_cast(0); SimpleEnum arg2 = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType; @@ -41321,7 +41347,7 @@ struct Type Optional> arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType; @@ -41375,7 +41401,7 @@ struct Type Optional> optionalList; Optional>> nullableOptionalList; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType; @@ -41418,7 +41444,7 @@ struct Type Structs::SimpleStruct::Type arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType; @@ -41447,7 +41473,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TimedInvokeRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -41478,7 +41504,7 @@ struct Type Optional arg1; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -41514,7 +41540,7 @@ struct Type SimpleEnum arg2 = static_cast(0); bool arg3 = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType; @@ -41548,7 +41574,7 @@ struct Type uint8_t arg1 = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType; @@ -42739,7 +42765,7 @@ struct Type DataModel::List arg5; DataModel::List arg6; - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -42779,7 +42805,7 @@ struct Type auto GetFabricIndex() const { return fabricIndex; } - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType @@ -42837,7 +42863,7 @@ struct Type uint32_t numCallsToFail = static_cast(0); bool takeMutex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -42877,7 +42903,7 @@ struct Type uint32_t id = static_cast(0); uint8_t percentage = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index b6bec09fa1783a..c88a81c1ec38c7 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -15596,8 +15596,9 @@ void registerClusterOperationalState(Commands & commands, CredentialIssuerComman chip::app::DataModel::List>>( Id, "operational-state-list", Attributes::OperationalStateList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "operational-state", Attributes::OperationalState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "operational-state", 0, UINT8_MAX, Attributes::OperationalState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>( Id, "operational-error", Attributes::OperationalError::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( @@ -15682,8 +15683,8 @@ void registerClusterRvcOperationalState(Commands & commands, CredentialIssuerCom chip::app::DataModel::List>>( Id, "operational-state-list", Attributes::OperationalStateList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>( - Id, "operational-state", Attributes::OperationalState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "operational-state", 0, UINT8_MAX, Attributes::OperationalState::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>( Id, "operational-error", Attributes::OperationalError::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( 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 70e10471ca7b5d..940b02f8c55ae8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3944,6 +3944,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::SmokeAlarm::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -3951,6 +3959,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::COAlarm::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -3959,6 +3975,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::LowBattery::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -4007,6 +4031,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::InterconnectSmokeAlarm::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -4015,6 +4047,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const SmokeCoAlarm::Events::InterconnectCOAlarm::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmSeverityLevel", indent + 1, value.alarmSeverityLevel); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmSeverityLevel'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -8927,7 +8967,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("OperationalStateList", 1, value); } case OperationalState::Attributes::OperationalState::Id: { - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType value; + chip::app::Clusters::OperationalState::OperationalStateEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationalState", 1, value); } @@ -8995,7 +9035,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("OperationalStateList", 1, value); } case RvcOperationalState::Attributes::OperationalState::Id: { - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType value; + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationalState", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index cf357feadac2c1..b1e36e7f41134a 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -38,7 +38,6 @@ class TestList : public Command printf("TestAccessControlCluster\n"); printf("Test_TC_ACL_1_1\n"); printf("Test_TC_ACL_2_1\n"); - printf("Test_TC_ACL_2_2\n"); printf("Test_TC_ACL_2_3\n"); printf("Test_TC_ACL_2_4\n"); printf("Test_TC_ACL_2_7\n"); @@ -162,8 +161,6 @@ class TestList : public Command printf("Test_TC_APPLAUNCHER_3_5\n"); printf("Test_TC_APPLAUNCHER_3_6\n"); printf("Test_TC_APPLAUNCHER_3_7\n"); - printf("Test_TC_APPLAUNCHER_3_8\n"); - printf("Test_TC_APPLAUNCHER_3_9\n"); printf("Test_TC_MEDIAINPUT_3_10\n"); printf("Test_TC_MEDIAINPUT_3_11\n"); printf("Test_TC_MEDIAINPUT_3_12\n"); @@ -208,8 +205,6 @@ class TestList : public Command printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); - printf("Test_TC_SC_5_1\n"); - printf("Test_TC_SC_5_2\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); printf("Test_TC_TMP_1_1\n"); @@ -290,6 +285,7 @@ class TestList : public Command printf("TestCommissioningWindow\n"); printf("TestCommissionerNodeId\n"); printf("TestTimeSynchronization\n"); + printf("TestOperationalState\n"); printf("TestMultiAdmin\n"); printf("Test_TC_DGSW_1_1\n"); printf("TestSubscribe_OnOff\n"); @@ -314,28 +310,8 @@ class TestList : public Command printf("Test_TC_G_2_1\n"); printf("Test_TC_ACFREMON_1_1\n"); printf("Test_TC_ACFREMON_2_1\n"); - printf("Test_TC_CFREMON_1_1\n"); - printf("Test_TC_CFREMON_2_1\n"); - printf("Test_TC_ESFREMON_1_1\n"); - printf("Test_TC_ESFREMON_2_1\n"); - printf("Test_TC_FTREMON_1_1\n"); - printf("Test_TC_FTREMON_2_1\n"); printf("Test_TC_HEPAFREMON_1_1\n"); printf("Test_TC_HEPAFREMON_2_1\n"); - printf("Test_TC_INKCREMON_1_1\n"); - printf("Test_TC_INKCREMON_2_1\n"); - printf("Test_TC_IONFREMON_1_1\n"); - printf("Test_TC_IONFREMON_2_1\n"); - printf("Test_TC_OZFREMON_1_1\n"); - printf("Test_TC_OZFREMON_2_1\n"); - printf("Test_TC_TCREMON_1_1\n"); - printf("Test_TC_TCREMON_2_1\n"); - printf("Test_TC_UVFREMON_1_1\n"); - printf("Test_TC_UVFREMON_2_1\n"); - printf("Test_TC_WTREMON_1_1\n"); - printf("Test_TC_WTREMON_2_1\n"); - printf("Test_TC_ZEOFREMON_1_1\n"); - printf("Test_TC_ZEOFREMON_2_1\n"); return CHIP_NO_ERROR; } @@ -407,7 +383,6 @@ class ManualTestList : public Command printf("Test_TC_DA_1_4\n"); printf("Test_TC_DA_1_5\n"); printf("Test_TC_DA_1_6\n"); - printf("Test_TC_BINFO_2_2\n"); printf("Test_TC_BINFO_2_4\n"); printf("Test_TC_OPCREDS_3_1\n"); printf("Test_TC_OPCREDS_3_2\n"); @@ -2513,102 +2488,6 @@ class Test_TC_ACL_2_1Suite : public TestCommand } }; -class Test_TC_ACL_2_2Suite : public TestCommand -{ -public: - Test_TC_ACL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_2", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 31UL)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ServerList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_ACL_2_3Suite : public TestCommand { public: @@ -47521,21 +47400,19 @@ class Test_TC_APPLAUNCHER_3_7Suite : public TestCommand } }; -class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand +class Test_TC_MEDIAINPUT_3_10Suite : public TestCommand { public: - Test_TC_APPLAUNCHER_3_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_8", 3, credsIssuerConfig) + Test_TC_MEDIAINPUT_3_10Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MEDIAINPUT_3_10", 2, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_APPLAUNCHER_3_8Suite() {} + ~Test_TC_MEDIAINPUT_3_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -47546,8 +47423,6 @@ class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -47569,15 +47444,10 @@ class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -47601,51 +47471,33 @@ class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Stop an app with the provided application ID"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; - value.application.Value().applicationID = - mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Commands::StopApp::Id, - value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Reads the Status attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, + "TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " + "inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " + "InputType (InputType Enums), Name (type: Strings), and Description(Type:String)"); + VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_APPLAUNCHER_3_9Suite : public TestCommand +class Test_TC_MEDIAINPUT_3_11Suite : public TestCommand { public: - Test_TC_APPLAUNCHER_3_9Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_9", 3, credsIssuerConfig) + Test_TC_MEDIAINPUT_3_11Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MEDIAINPUT_3_11", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); + AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_APPLAUNCHER_3_9Suite() {} + ~Test_TC_MEDIAINPUT_3_11Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -47656,8 +47508,7 @@ class Test_TC_APPLAUNCHER_3_9Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; + chip::Optional mIndex; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -47679,113 +47530,19 @@ class Test_TC_APPLAUNCHER_3_9Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH sends HideApp command to DUT"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; - value.application.Value().applicationID = - mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Commands::HideApp::Id, - value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Reads the Status attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_10Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_10Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_10", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentInput", value, mIndex.HasValue() ? mIndex.Value() : 1U)); } break; default: @@ -47819,138 +47576,41 @@ class Test_TC_MEDIAINPUT_3_10Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, chip::NullOptional); } + case 2: { + LogStep(2, "TH sends SelectInput command to DUT to select an input by passing the index of the preferred input."); + VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; + value.index = mIndex.HasValue() ? mIndex.Value() : 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::SelectInput::Id, value, + chip::NullOptional + + ); + } + case 3: { + LogStep(3, "TH reads _CurrentInput attribute from the DUT to show the current input selected."); + VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0001 && MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::CurrentInput::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_MEDIAINPUT_3_11Suite : public TestCommand +class Test_TC_MEDIAINPUT_3_12Suite : public TestCommand { public: - Test_TC_MEDIAINPUT_3_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_11", 4, credsIssuerConfig) + Test_TC_MEDIAINPUT_3_12Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MEDIAINPUT_3_12", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MEDIAINPUT_3_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mIndex; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentInput", value, mIndex.HasValue() ? mIndex.Value() : 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " - "inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " - "InputType (InputType Enums), Name (type: Strings), and Description(Type:String)"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH sends SelectInput command to DUT to select an input by passing the index of the preferred input."); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; - value.index = mIndex.HasValue() ? mIndex.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::SelectInput::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "TH reads _CurrentInput attribute from the DUT to show the current input selected."); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0001 && MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::CurrentInput::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_12Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_12", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_12Suite() {} + ~Test_TC_MEDIAINPUT_3_12Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -58135,10 +57795,10 @@ class Test_TC_RH_2_1Suite : public TestCommand } }; -class Test_TC_SC_5_1Suite : public TestCommand +class Test_TC_SWTCH_1_1Suite : public TestCommand { public: - Test_TC_SC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_1", 31, credsIssuerConfig) + Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -58146,7 +57806,7 @@ class Test_TC_SC_5_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_5_1Suite() {} + ~Test_TC_SWTCH_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -58159,8 +57819,6 @@ class Test_TC_SC_5_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::NodeId commissionerNodeId; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -58180,229 +57838,202 @@ class Test_TC_SC_5_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeId = value.nodeId; + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } - shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); + } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); + } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Test Group", 10))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("", 0))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime0.Value()", value.groupKeySet.epochStartTime0.Value(), 2220000ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey1", value.groupKeySet.epochKey1)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime1", value.groupKeySet.epochStartTime1)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime1.Value()", value.groupKeySet.epochStartTime1.Value(), 2220001ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey2", value.groupKeySet.epochKey2)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime2", value.groupKeySet.epochStartTime2)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2220002ULL)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 0)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupId", iter_0.GetValue().groupId, 259U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 1)); - } - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 259U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Test Group", 10))); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 1)); - } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 259U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 1)); - } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 0)); - } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 0)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -58426,413 +58057,241 @@ class Test_TC_SC_5_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); + LogStep(1, "Read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, + chip::NullOptional); } case 2: { - LogStep(2, "TH adds ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 259ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); + LogStep(2, "Read FeatureMap attribute and Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("!SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, "TH adds ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "Given SWTCH.S.F00(LS) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 4: { - LogStep(4, "TH sends KeySetWrite command with incorrect key"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 419U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 111ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 222ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 333ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); + LogStep(4, "Given SWTCH.S.F01(MS) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 5: { - LogStep(5, "TH sends KeySetWrite command with incorrect key"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "Given SWTCH.S.F02(MSR) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 6: { - LogStep(6, "TH sends KeySetWrite command with TH key"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 419U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2220000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2220001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2220002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); + LogStep(6, "Given SWTCH.S.F03(MSL) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 7: { - LogStep(7, "TH sends KeySetWrite command with TH key"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(7, "Given SWTCH.S.F04(MSM) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 8: { - LogStep(8, "TH binds GroupId to GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 259U; - listHolder_0->mList[0].groupKeySetID = 419U; - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); + LogStep(8, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 9: { - LogStep(9, "TH binds GroupId to GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(9, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 10: { - LogStep(10, "TH sends RemoveAllGroups command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); + LogStep(10, "Read the global attribute: EventList "); + VerifyOrDo(!ShouldSkip(" !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 "), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, + chip::NullOptional); } case 11: { - LogStep(11, "TH sends AddGroup command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 259U; - value.groupName = chip::Span("Test Groupgarbage: not in length on purpose", 10); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); + LogStep(11, "Read EventList if SWTCH.S.F00(LS)"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, + chip::NullOptional); } case 12: { - LogStep(12, "TH sends ViewGroup command"); - VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 259U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); + LogStep(12, "Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && !SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, + chip::NullOptional); } case 13: { - LogStep(13, "TH sends ViewGroup command"); - VerifyOrDo(!ShouldSkip("!(G.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 259U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); + LogStep(13, "Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, + chip::NullOptional); } case 14: { - LogStep(14, "TH sends KeySetRead"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; - value.groupKeySetID = 419U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, - value, chip::NullOptional - - ); + LogStep(14, "Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, + chip::NullOptional); } case 15: { - LogStep(15, "TH sends KeySetRead"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(15, "Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); + VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, + chip::NullOptional); } case 16: { - LogStep(16, "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); + LogStep(16, "Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); + VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, + chip::NullOptional); } case 17: { - LogStep(17, "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(17, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); } case 18: { - LogStep(18, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("G.S.F00 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); + LogStep(18, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); } - case 21: { - LogStep(21, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); } - case 22: { - LogStep(22, "TH removes the GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; - value.groupKeySetID = 419U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional + return CHIP_NO_ERROR; + } +}; - ); - } - case 23: { - LogStep(23, "TH removes the GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "TH verifies the corresponding GroupKeyMap entry has been removed"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "TH verifies the corresponding GroupKeyMap entry has been removed"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "TH cleans up groups using RemoveAllGroups command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional +class Test_TC_SWTCH_2_1Suite : public TestCommand +{ +public: + Test_TC_SWTCH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_1", 4, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } - ); - } - case 27: { - LogStep(27, "TH verifies the group has been removed in the GroupTable"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "TH verifies the group has been removed in the GroupTable"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "TH removes ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; + ~Test_TC_SWTCH_2_1Suite() {} - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; + uint8_t NumberOfPositionsValue; - value = chip::app::DataModel::List( - listHolder_0->mList, 1); + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + NumberOfPositionsValue = value; } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, NumberOfPositionsValue - 1)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } - case 30: { - LogStep(30, "TH removes ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read NumberOfPositions attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::NumberOfPositions::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read CurrentPosition attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::CurrentPosition::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read MultiPressMax attribute"); + VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::MultiPressMax::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_SC_5_2Suite : public TestCommand +class Test_TC_TMP_1_1Suite : public TestCommand { public: - Test_TC_SC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_2", 20, credsIssuerConfig) + Test_TC_TMP_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -58840,7 +58299,7 @@ class Test_TC_SC_5_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_5_2Suite() {} + ~Test_TC_TMP_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -58853,8 +58312,6 @@ class Test_TC_SC_5_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::NodeId commissionerNodeId; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -58874,94 +58331,72 @@ class Test_TC_SC_5_2Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeId = value.nodeId; + VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } - shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 10: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Test Group 0101", 15))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 14: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("", 0))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -58988,296 +58423,193 @@ class Test_TC_SC_5_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); + LogStep(1, "Read ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "TH adds ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(4); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 259ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); + LogStep(2, "Read FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH adds ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "TH sends KeySetWrite command with TH key"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 419U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2220000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2220001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2220002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); + LogStep(4, "Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH sends KeySetWrite command with TH key"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "Read AcceptedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH binds GroupId to GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 419U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 259U; - listHolder_0->mList[1].groupKeySetID = 419U; - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); + LogStep(6, "Read GeneratedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "TH binds GroupId to GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, + "Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " + "manufacturer specific event IDs."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH sends RemoveAllGroups command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); } - case 9: { - LogStep(9, "TH sends AddGroup command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 259U; - value.groupName = chip::Span("Test Group 0103garbage: not in length on purpose", 15); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional + return CHIP_NO_ERROR; + } +}; - ); - } - case 10: { - LogStep(10, "TH sends AddGroup command again but using group messaging (0x0103)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 257U; - value.groupName = chip::Span("Test Group 0101garbage: not in length on purpose", 15); - return SendGroupCommand(kIdentityAlpha, 259, Groups::Id, Groups::Commands::AddGroup::Id, value); - } - case 11: { - LogStep(11, "Wait for AddGroup"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Verify there is no response from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Verify that there is no response from DUTgarbage: not in length on purpose", 41); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "TH sends ViewGroup command"); - VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional +class Test_TC_TMP_2_1Suite : public TestCommand +{ +public: + Test_TC_TMP_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_1", 5, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } - ); - } - case 14: { - LogStep(14, "TH sends ViewGroup command"); - VerifyOrDo(!ShouldSkip("!(G.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional + ~Test_TC_TMP_2_1Suite() {} - ); - } - case 15: { - LogStep(15, "TH removes the GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; - value.groupKeySetID = 419U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - ); - } - case 16: { - LogStep(16, "TH removes the GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "TH cleans up groups using RemoveAllGroups command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - ); - } - case 18: { - LogStep(18, "TH removes ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; + chip::app::DataModel::Nullable CurrentMinMeasured; + chip::app::DataModel::Nullable CurrentMaxMeasured; - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); + // + // Tests methods + // - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; - value = chip::app::DataModel::List( - listHolder_0->mList, 1); + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); + CurrentMinMeasured = value; } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentMinMeasured)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + CurrentMaxMeasured = value; + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentMinMeasured)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, CurrentMaxMeasured)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } - case 19: { - LogStep(19, "TH removes ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Read the mandatory attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the optional attribute: Tolerance"); + VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_SWTCH_1_1Suite : public TestCommand +class Test_TC_TSTAT_1_1Suite : public TestCommand { public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 19, credsIssuerConfig) + Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -59285,7 +58617,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SWTCH_1_1Suite() {} + ~Test_TC_TSTAT_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -59319,7 +58651,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; @@ -59339,10 +58671,6 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); } break; case 4: @@ -59352,7 +58680,6 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 5: @@ -59361,9 +58688,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 6: @@ -59372,10 +58697,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 7: @@ -59384,19 +58706,16 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); } break; case 9: @@ -59406,7 +58725,8 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); @@ -59418,862 +58738,63 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); } break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read FeatureMap attribute and Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("!SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Given SWTCH.S.F00(LS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Given SWTCH.S.F01(MS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Given SWTCH.S.F02(MSR) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Given SWTCH.S.F03(MSL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Given SWTCH.S.F04(MSM) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: EventList "); - VerifyOrDo(!ShouldSkip(" !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Read EventList if SWTCH.S.F00(LS)"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && !SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_2_1Suite : public TestCommand -{ -public: - Test_TC_SWTCH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t NumberOfPositionsValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - NumberOfPositionsValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, NumberOfPositionsValue - 1)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read NumberOfPositions attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::NumberOfPositions::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read CurrentPosition attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::CurrentPosition::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read MultiPressMax attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::MultiPressMax::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_1_1Suite : public TestCommand -{ -public: - Test_TC_TMP_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_1_1", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TMP_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read AcceptedCommandList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read GeneratedCommandList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_2_1Suite : public TestCommand -{ -public: - Test_TC_TMP_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TMP_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable CurrentMinMeasured; - chip::app::DataModel::Nullable CurrentMaxMeasured; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - CurrentMinMeasured = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentMinMeasured)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - CurrentMaxMeasured = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentMinMeasured)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, CurrentMaxMeasured)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the optional attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSTAT_1_1Suite : public TestCommand -{ -public: - Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 25, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSTAT_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); @@ -91343,6 +89864,289 @@ class TestTimeSynchronizationSuite : public TestCommand } }; +class TestOperationalStateSuite : public TestCommand +{ +public: + TestOperationalStateSuite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("TestOperationalState", 15, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~TestOperationalStateSuite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable> value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNull("phaseList", value)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNull("currentPhase", value)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNull("countdownTime", value)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 0)); + VerifyOrReturn( + CheckValue("operationalStateList[0].operationalStateID", iter_0.GetValue().operationalStateID, 0U)); + VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 1)); + VerifyOrReturn( + CheckValue("operationalStateList[1].operationalStateID", iter_0.GetValue().operationalStateID, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 2)); + VerifyOrReturn( + CheckValue("operationalStateList[2].operationalStateID", iter_0.GetValue().operationalStateID, 2U)); + VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 3)); + VerifyOrReturn( + CheckValue("operationalStateList[3].operationalStateID", iter_0.GetValue().operationalStateID, 3U)); + VerifyOrReturn(CheckNoMoreListItems("operationalStateList", iter_0, 4)); + } + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("operationalError.errorStateID", value.errorStateID, 0U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::OperationalStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("operationalState", value, 0U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 0U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::OperationalStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("operationalState", value, 1U)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 0U)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::OperationalStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("operationalState", value, 2U)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 0U)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::OperationalStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("operationalState", value, 1U)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 0U)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalState::OperationalStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("operationalState", value, 0U)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read Phase List"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::PhaseList::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read current Phase"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::CurrentPhase::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Read Countdown Time"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::CountdownTime::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read Operational State List"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::OperationalStateList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read current Operational Error"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::OperationalError::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read current Operational State"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "Start Command"); + ListFreer listFreer; + chip::app::Clusters::OperationalState::Commands::Start::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Commands::Start::Id, value, + chip::NullOptional + + ); + } + case 8: { + LogStep(8, "Read current Operational State"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "Pause Command"); + ListFreer listFreer; + chip::app::Clusters::OperationalState::Commands::Pause::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Commands::Pause::Id, value, + chip::NullOptional + + ); + } + case 10: { + LogStep(10, "Read current Operational State"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "Resume Command"); + ListFreer listFreer; + chip::app::Clusters::OperationalState::Commands::Resume::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Commands::Resume::Id, value, + chip::NullOptional + + ); + } + case 12: { + LogStep(12, "Read current Operational State"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "Stop Command"); + ListFreer listFreer; + chip::app::Clusters::OperationalState::Commands::Stop::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Commands::Stop::Id, value, + chip::NullOptional + + ); + } + case 14: { + LogStep(14, "Read current Operational State"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, + OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class TestMultiAdminSuite : public TestCommand { public: @@ -107600,3762 +106404,51 @@ class Test_TC_G_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !G.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Given G.S.F00 ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads EventList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_1Suite : public TestCommand -{ -public: - Test_TC_G_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_1", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::BitMask NameSupportFeatureSupportedValue; - chip::BitMask NameSupportValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, 128U)); - NameSupportFeatureSupportedValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, 0U)); - NameSupportValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, NameSupportFeatureSupportedValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, NameSupportValue)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads NameSupport attribute from DUT"); - VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads NameSupport attribute from DUT"); - VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "TH writes NameSupport attribute as 0x80 EXOR the value as read in step 1"); - VerifyOrDo(!ShouldSkip("G.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(128U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads NameSupport attribute from DUT"); - VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads NameSupport attribute from DUT"); - VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_ACFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ACFREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!ACFREMON.S.F00 && !ACFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given ACFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given ACFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACFREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_ACFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ACFREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACFREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_CFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CFREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!CFREMON.S.F00 && !CFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given CFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given CFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(CFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("CFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (CFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("CFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CFREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_CFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CFREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CFREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CeramicFilterMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CeramicFilterMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("CFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("CFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("CFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("CFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CeramicFilterMonitoring::Id, - CeramicFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ESFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_ESFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ESFREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ESFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!ESFREMON.S.F00 && !ESFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given ESFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ESFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given ESFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ESFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(ESFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("ESFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (ESFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("ESFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("ESFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ESFREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_ESFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ESFREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ESFREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ElectrostaticFilterMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ElectrostaticFilterMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("ESFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("ESFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("ESFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("ESFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectrostaticFilterMonitoring::Id, - ElectrostaticFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FTREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_FTREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_FTREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FTREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!FTREMON.S.F00 && !FTREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given FTREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FTREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given FTREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FTREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(FTREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FTREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (FTREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("FTREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("FTREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FTREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_FTREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_FTREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FTREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FuelTankMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FuelTankMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("FTREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("FTREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("FTREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("FTREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FuelTankMonitoring::Id, - FuelTankMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_HEPAFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_HEPAFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_HEPAFREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_HEPAFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!HEPAFREMON.S.F00 && !HEPAFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given HEPAFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given HEPAFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_HEPAFREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_HEPAFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_HEPAFREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_HEPAFREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_INKCREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_INKCREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_INKCREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_INKCREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!INKCREMON.S.F00 && !INKCREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given INKCREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("INKCREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given INKCREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("INKCREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(INKCREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("INKCREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (INKCREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("INKCREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("INKCREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_INKCREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_INKCREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_INKCREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_INKCREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::InkCartridgeMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::InkCartridgeMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("INKCREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("INKCREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("INKCREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("INKCREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), InkCartridgeMonitoring::Id, - InkCartridgeMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IONFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_IONFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_IONFREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IONFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!IONFREMON.S.F00 && !IONFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given IONFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("IONFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given IONFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("IONFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(IONFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("IONFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (IONFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("IONFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("IONFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IONFREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_IONFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_IONFREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IONFREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::IonizingFilterMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::IonizingFilterMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("IONFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("IONFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("IONFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("IONFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IonizingFilterMonitoring::Id, - IonizingFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OZFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_OZFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OZFREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OZFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!OZFREMON.S.F00 && !OZFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given OZFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given OZFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(OZFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("OZFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (OZFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("OZFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OZFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OZFREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_OZFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OZFREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OZFREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OzoneFilterMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OzoneFilterMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("OZFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("OZFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("OZFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("OZFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneFilterMonitoring::Id, - OzoneFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_TCREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TCREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!TCREMON.S.F00 && !TCREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given TCREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TCREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Given TCREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TCREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the feature dependent(TCREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TCREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (TCREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("TCREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TCREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_TCREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TCREMON_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TonerCartridgeMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TonerCartridgeMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("TCREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("TCREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("TCREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("TCREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TonerCartridgeMonitoring::Id, - TonerCartridgeMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_UVFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_UVFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_UVFREMON_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_UVFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::ClusterRevision::Id, true, + chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!UVFREMON.S.F00 && !UVFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !G.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, "Given UVFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("UVFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + LogStep(3, "Given G.S.F00 ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 4: { - LogStep(4, "Given UVFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("UVFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + LogStep(4, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(5, "TH reads EventList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::EventList::Id, true, + chip::NullOptional); } case 6: { - LogStep(6, "Read the feature dependent(UVFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("UVFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(6, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); } case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (UVFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("UVFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("UVFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); + LogStep(7, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_UVFREMON_2_1Suite : public TestCommand +class Test_TC_G_2_1Suite : public TestCommand { public: - Test_TC_UVFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_UVFREMON_2_1", 5, credsIssuerConfig) + Test_TC_G_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111363,7 +106456,7 @@ class Test_TC_UVFREMON_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_UVFREMON_2_1Suite() {} + ~Test_TC_G_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -111376,6 +106469,9 @@ class Test_TC_UVFREMON_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::BitMask NameSupportFeatureSupportedValue; + chip::BitMask NameSupportValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -111395,39 +106491,38 @@ class Test_TC_UVFREMON_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::Percent value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); + VerifyOrReturn(CheckValue("nameSupport", value, 128U)); + NameSupportFeatureSupportedValue = value; } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UvFilterMonitoring::DegradationDirectionEnum value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); + VerifyOrReturn(CheckValue("nameSupport", value, 0U)); + NameSupportValue = value; } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UvFilterMonitoring::ChangeIndicationEnum value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + VerifyOrReturn(CheckValue("nameSupport", value, NameSupportFeatureSupportedValue)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); + VerifyOrReturn(CheckValue("nameSupport", value, NameSupportValue)); } break; default: @@ -111453,39 +106548,48 @@ class Test_TC_UVFREMON_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("UVFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); + LogStep(1, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); } case 2: { - LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("UVFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); + LogStep(2, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("UVFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); + LogStep(3, "TH writes NameSupport attribute as 0x80 EXOR the value as read in step 1"); + VerifyOrDo(!ShouldSkip("G.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::BitMask value; + value = static_cast>(128U); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, value, + chip::NullOptional, chip::NullOptional); } case 4: { - LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("UVFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UvFilterMonitoring::Id, - UvFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); + LogStep(4, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_WTREMON_1_1Suite : public TestCommand +class Test_TC_ACFREMON_1_1Suite : public TestCommand { public: - Test_TC_WTREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WTREMON_1_1", 12, credsIssuerConfig) + Test_TC_ACFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_ACFREMON_1_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111493,7 +106597,7 @@ class Test_TC_WTREMON_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_WTREMON_1_1Suite() {} + ~Test_TC_ACFREMON_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -111657,75 +106761,75 @@ class Test_TC_WTREMON_1_1Suite : public TestCommand } case 1: { LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!WTREMON.S.F00 && !WTREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("!ACFREMON.S.F00 && !ACFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Given WTREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("WTREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + LogStep(3, "Given ACFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Given WTREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("WTREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + LogStep(4, "Given ACFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the feature dependent(WTREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WTREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(6, "Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (WTREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("WTREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(7, "Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 9: { LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("WTREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("ACFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 10: { LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 11: { LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::EventList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_WTREMON_2_1Suite : public TestCommand +class Test_TC_ACFREMON_2_1Suite : public TestCommand { public: - Test_TC_WTREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WTREMON_2_1", 5, credsIssuerConfig) + Test_TC_ACFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_ACFREMON_2_1", 5, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111733,7 +106837,7 @@ class Test_TC_WTREMON_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_WTREMON_2_1Suite() {} + ~Test_TC_ACFREMON_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -111775,7 +106879,7 @@ class Test_TC_WTREMON_2_1Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::WaterTankMonitoring::DegradationDirectionEnum value; + chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -111785,7 +106889,7 @@ class Test_TC_WTREMON_2_1Suite : public TestCommand case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::WaterTankMonitoring::ChangeIndicationEnum value; + chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -111824,38 +106928,38 @@ class Test_TC_WTREMON_2_1Suite : public TestCommand } case 1: { LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("WTREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::Condition::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); } case 2: { LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("WTREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); } case 3: { LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("WTREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); } case 4: { LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("WTREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WaterTankMonitoring::Id, - WaterTankMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("ACFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, + ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_ZEOFREMON_1_1Suite : public TestCommand +class Test_TC_HEPAFREMON_1_1Suite : public TestCommand { public: - Test_TC_ZEOFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ZEOFREMON_1_1", 12, credsIssuerConfig) + Test_TC_HEPAFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_HEPAFREMON_1_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111863,7 +106967,7 @@ class Test_TC_ZEOFREMON_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ZEOFREMON_1_1Suite() {} + ~Test_TC_HEPAFREMON_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -112027,75 +107131,75 @@ class Test_TC_ZEOFREMON_1_1Suite : public TestCommand } case 1: { LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!ZEOFREMON.S.F00 && !ZEOFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("!HEPAFREMON.S.F00 && !HEPAFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Given ZEOFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + LogStep(3, "Given HEPAFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Given ZEOFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); + LogStep(4, "Given HEPAFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the feature dependent(ZEOFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(6, "Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the optional attribute InPlaceIndicator (ZEOFREMON.S.A0002) in AttributeList"); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(7, "Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0002) in AttributeList"); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { LogStep(8, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 9: { LogStep(9, "Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 10: { LogStep(10, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 11: { LogStep(11, "TH reads EventList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_ZEOFREMON_2_1Suite : public TestCommand +class Test_TC_HEPAFREMON_2_1Suite : public TestCommand { public: - Test_TC_ZEOFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ZEOFREMON_2_1", 5, credsIssuerConfig) + Test_TC_HEPAFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_HEPAFREMON_2_1", 5, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112103,7 +107207,7 @@ class Test_TC_ZEOFREMON_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ZEOFREMON_2_1Suite() {} + ~Test_TC_HEPAFREMON_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -112145,7 +107249,7 @@ class Test_TC_ZEOFREMON_2_1Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ZeoliteFilterMonitoring::DegradationDirectionEnum value; + chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -112155,7 +107259,7 @@ class Test_TC_ZEOFREMON_2_1Suite : public TestCommand case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ZeoliteFilterMonitoring::ChangeIndicationEnum value; + chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -112194,27 +107298,27 @@ class Test_TC_ZEOFREMON_2_1Suite : public TestCommand } case 1: { LogStep(1, "TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); } case 2: { LogStep(2, "TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); } case 3: { LogStep(3, "TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); } case 4: { LogStep(4, "TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("ZEOFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ZeoliteFilterMonitoring::Id, - ZeoliteFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); + VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, + HepaFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -115868,61 +110972,6 @@ class Test_TC_DA_1_6Suite : public TestCommand } }; -class Test_TC_BINFO_2_2Suite : public TestCommand -{ -public: - Test_TC_BINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BINFO_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_BINFO_2_4Suite : public TestCommand { public: @@ -138610,7 +133659,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -138734,8 +133782,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -138780,8 +133826,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -138862,6 +133906,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -138886,28 +133931,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -138968,7 +133993,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 7e47aa29ac6c57..8cbd89fe9f47cf 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -39,7 +39,6 @@ class TestList : public Command { printf("TestAccessControlCluster\n"); printf("Test_TC_ACL_1_1\n"); printf("Test_TC_ACL_2_1\n"); - printf("Test_TC_ACL_2_2\n"); printf("Test_TC_ACL_2_3\n"); printf("Test_TC_ACE_1_1\n"); printf("Test_TC_ACE_1_5\n"); @@ -168,7 +167,6 @@ class TestList : public Command { printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); - printf("Test_TC_SC_5_1\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); @@ -2964,143 +2962,6 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { } }; -class Test_TC_ACL_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ACL_2_2() - : TestCommandBridge("Test_TC_ACL_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ACL_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ACL_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ACL_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0\n"); - err = TestTh1ReadsDutDescriptorClusterServerListAttributeFromEndpoint0_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestTh1ReadsDutDescriptorClusterServerListAttributeFromEveryEndpointExcept0_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestTh1ReadsDutDescriptorClusterServerListAttributeFromEndpoint0_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("serverList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("serverList", value, 31UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsDutDescriptorClusterServerListAttributeFromEveryEndpointExcept0_2() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - class Test_TC_ACL_2_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -69984,1112 +69845,6 @@ class Test_TC_RH_2_1 : public TestCommandBridge { } }; -class Test_TC_SC_5_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SC_5_1() - : TestCommandBridge("Test_TC_SC_5_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_SC_5_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_5_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_5_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the commissioner node ID\n"); - err = TestReadTheCommissionerNodeId_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH adds ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThAddsAclOperatePrivilegesForGroup0x0103_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH adds ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThAddsAclOperatePrivilegesForGroup0x0103_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends KeySetWrite command with incorrect key\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithIncorrectKey_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends KeySetWrite command with incorrect key\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithIncorrectKey_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends KeySetWrite command with TH key\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithThKey_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends KeySetWrite command with TH key\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithThKey_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH binds GroupId to GroupKeySet\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThBindsGroupIdToGroupKeySet_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH binds GroupId to GroupKeySet\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThBindsGroupIdToGroupKeySet_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends RemoveAllGroups command\n"); - err = TestThSendsRemoveAllGroupsCommand_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends AddGroup command\n"); - err = TestThSendsAddGroupCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends ViewGroup command\n"); - if (ShouldSkip("G.S.F00")) { - NextTest(); - return; - } - err = TestThSendsViewGroupCommand_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends ViewGroup command\n"); - if (ShouldSkip("!(G.S.F00)")) { - NextTest(); - return; - } - err = TestThSendsViewGroupCommand_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends KeySetRead\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThSendsKeySetRead_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends KeySetRead\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetRead_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads GroupTable attribute\n"); - if (ShouldSkip("G.S.F00 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && G.S.F00")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY && !G.S.F00")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !G.S.F00")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH removes the GroupKeySet\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThRemovesTheGroupKeySet_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH removes the GroupKeySet\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThRemovesTheGroupKeySet_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH cleans up groups using RemoveAllGroups command\n"); - err = TestThCleansUpGroupsUsingRemoveAllGroupsCommand_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH verifies the group has been removed in the GroupTable\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH verifies the group has been removed in the GroupTable\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH removes ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThRemovesAclOperatePrivilegesForGroup0x0103_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH removes ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThRemovesAclOperatePrivilegesForGroup0x0103_30(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 31; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - NSNumber * _Nonnull commissionerNodeId; - - CHIP_ERROR TestReadTheCommissionerNodeId_1() - { - - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId("alpha", value, ^(const chip::GetCommissionerNodeIdResponse & values) { - { - commissionerNodeId = [[NSNumber alloc] initWithUnsignedLongLong:values.nodeId]; - } - NextTest(); - }); - } - - CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [commissionerNodeId copy]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:259ULL]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH adds ACL Operate privileges for Group 0x0103 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_3() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:111ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:222ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:333ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends KeySetWrite command with incorrect key Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_5() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2220000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2220001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2220002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends KeySetWrite command with TH key Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_7() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThBindsGroupIdToGroupKeySet_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH binds GroupId to GroupKeySet Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThBindsGroupIdToGroupKeySet_9() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThSendsRemoveAllGroupsCommand_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends RemoveAllGroups command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsAddGroupCommand_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - params.groupName = @"Test Group"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends AddGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsViewGroupCommand_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends ViewGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); - } - - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Test Group")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsViewGroupCommand_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends ViewGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); - } - - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetRead_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends KeySetRead Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull( - "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2220000ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2220001ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2220002ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetRead_15() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_17() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsGroupTableAttribute_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupTable attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Test Group")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGroupTableAttribute_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsGroupTableAttribute_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupTable attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, @"")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGroupTableAttribute_21() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThRemovesTheGroupKeySet_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH removes the GroupKeySet Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThRemovesTheGroupKeySet_23() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies the corresponding GroupKeyMap entry has been removed Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(0))); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_25() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThCleansUpGroupsUsingRemoveAllGroupsCommand_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH cleans up groups using RemoveAllGroups command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies the group has been removed in the GroupTable Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_28() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [commissionerNodeId copy]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH removes ACL Operate privileges for Group 0x0103 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_30() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - class Test_TC_SWTCH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -149785,7 +148540,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -149914,7 +148668,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(),